home *** CD-ROM | disk | FTP | other *** search
/ User's Choice Windows CD / User's Choice Windows CD (CMS Software)(1993).iso / windows2 / hp22d3.zip / REFGUIDE / PROPERTS.TXT < prev    next >
Text File  |  1991-05-16  |  125KB  |  3,854 lines

  1.  
  2.  
  3.  
  4.  
  5.     ________________________________________________________________________
  6.                                              Chapter 12: Properties   145
  7.     ________________________________________________________________________
  8.  
  9.  
  10.     CHAPTER TWELVE:  PROPERTIES
  11.  
  12.  
  13.     INTRODUCTION
  14.  
  15.     This chapter describes how properties are used in the HyperPAD system.
  16.     The first section describes the global properties. The next five
  17.     sections describe the properties of pads, buttons, fields, pages and
  18.     backgrounds. The final four sections describe the properties of the
  19.     message box, tool box, status bar, and menu bar.
  20.  
  21.  
  22.     WHAT ARE PROPERTIES
  23.  
  24.     A property is a characteristic of an object that defines its appearance
  25.     and behavior. Objects of the same type (such as all buttons) have the
  26.     same properties. Each button, however, can have different values
  27.     associated with these properties. An example of a button property is
  28.     fillColor, whose value is a number between 0 and 255.
  29.  
  30.     Objects are created with default values for their properties. You can
  31.     alter a property value in one of two ways. Many property values are
  32.     accessible using the object's Info dialog box on the Objects menu. The
  33.     other way to modify an object's property value is with the PADtalk
  34.     language, which gives you access (using the set command) to all object
  35.     properties.
  36.  
  37.  
  38.  
  39.     ________________________________________________________________________
  40.                                              Chapter 12: Properties   146
  41.     ________________________________________________________________________
  42.  
  43.  
  44.     PROPERTY LISTINGS
  45.  
  46.  
  47.     GLOBAL PROPERTIES
  48.  
  49.     The global properties are:
  50.  
  51.     asciiChar          lockRecent          paintAttr
  52.     autoSave           lockScreen          parity
  53.     baud               markerAttr          printDevice
  54.     currentDirectory   markerChar          printer
  55.     cursor             maxDirtyPages       printerTranslation
  56.     cursorLoc          modem               selectedText
  57.     dataBits           mouse               stopBits
  58.     fileSortMethod     mouseAttr           tabbing
  59.     focus              mouseChar           userLevel
  60.     lockMessages       numberFormat
  61.  
  62.  
  63.     PAD PROPERTIES
  64.  
  65.     The pad properties are:
  66.  
  67.     cantDelete         cantModify          longName
  68.     name               passwordOnly        script
  69.  
  70.  
  71.  
  72.     ________________________________________________________________________
  73.                                              Chapter 12: Properties   147
  74.     ________________________________________________________________________
  75.  
  76.  
  77.     PAGE PROPERTIES
  78.  
  79.     The page properties are:
  80.  
  81.     cantDelete         id                  longID
  82.     longName           name                script
  83.  
  84.  
  85.     BACKGROUND PROPERTIES
  86.  
  87.     The background properties are:
  88.  
  89.     cantDelete         id                  longID
  90.     longName           name                script
  91.  
  92.  
  93.     BUTTON PROPERTIES
  94.  
  95.     The button properties are:
  96.  
  97.     acceleratorColor   hilite              name
  98.     acceleratorKey     hiliteColor         rectangle
  99.     align              hiliteIfFocus       script
  100.     autoHilite         id                  shadow
  101.     borderColor        layer               showName
  102.     check              location            style
  103.     color              lockText            visible
  104.  
  105.  
  106.  
  107.     ________________________________________________________________________
  108.                                              Chapter 12: Properties   148
  109.     ________________________________________________________________________
  110.  
  111.  
  112.     FIELD PROPERTIES
  113.  
  114.     The field properties are:
  115.  
  116.     acceleratorColor   hiliteIfFocus       nameColor
  117.     acceleratorKey     id                  namePosition
  118.     align              insertPoint         rectangle
  119.     autoHilite         layer               script
  120.     borderColor        listbox             scrollable
  121.     color              location            showName
  122.     currentLine        lockText            startLine
  123.     edgeType           longID              style
  124.     fillColor          longName            value
  125.     hilite             markedLines         visible
  126.     hiliteColor        name                withEdge
  127.  
  128.  
  129.     MESSAGE BOX PROPERTIES
  130.  
  131.     The message box properties are: 
  132.  
  133.     location           value               visible
  134.     width
  135.  
  136.  
  137.     TOOL BOX PROPERTIES
  138.  
  139.     The tool box properties are:
  140.  
  141.     location           visible
  142.  
  143.  
  144.     MENU BAR PROPERTIES
  145.  
  146.     There is one menu bar property:
  147.  
  148.     visible
  149.  
  150.  
  151.     STATUS BAR PROPERTIES
  152.  
  153.     There is one status bar property:
  154.  
  155.     visible
  156.  
  157.  
  158.  
  159.     ________________________________________________________________________
  160.                                              Chapter 12: Properties   149
  161.     ________________________________________________________________________
  162.  
  163.  
  164.     GLOBAL PROPERTIES
  165.  
  166.     -----------------------------------
  167.     ASCIICHAR
  168.  
  169.     Purpose: This property allows the user to set and get the value of the
  170.     ASCII paint character. The range of available values is from 0 to 255.
  171.     You can also set or get this property by selecting ASCII char from the
  172.     Workspace menu.
  173.  
  174.     Examples:
  175.  
  176.     set the asciiChar to charToNum("A");
  177.  
  178.     set the asciiChar to 65;
  179.  
  180.     if the asciiChar is charToNum(the first char of it) then
  181.       answer "they are the same";
  182.  
  183.     The following handler demonstrates a use of asciiChar:
  184.  
  185.     handler select;
  186.     begin
  187.       doMenu "Text";
  188.       doMenu "ASCII char...";
  189.       answer "you picked" && the asciiChar with "Ok";
  190.     end;
  191.  
  192.     See Also: paintAttr
  193.  
  194.     -----------------------------------
  195.     AUTOSAVE
  196.  
  197.     Purpose: By default, HyperPAD automatically saves your work every 30
  198.     seconds. With autoSave, you can regulate (turn on or off) this feature.
  199.  
  200.     HyperPAD stores pages in a memory cache for quick access. If you modify
  201.     a page in some way (i.e. type into a field or change the color of an
  202.     object), the page is considered "dirty". The cache can't hold more than
  203.     50 pages. If the cache fills up, the pages accessed least are removed
  204.     from the cache.
  205.  
  206.     The maximum number of dirty (modified) pages allowed in the cache is
  207.     determined by the maxDirtyPages property, which is 20 by default. When
  208.     the number of dirty pages exceeds this number, they are saved to disk.
  209.     The dirty pages will also be saved to disk if HyperPAD runs low on
  210.     memory.
  211.  
  212.  
  213.  
  214.     ________________________________________________________________________
  215.                                              Chapter 12: Properties   150
  216.     ________________________________________________________________________
  217.  
  218.  
  219.     If autoSave is true, then every 30 seconds HyperPAD saves as many dirty
  220.     pages as it can in 1 second. The disk access occurs at idle time (at the
  221.     end of all pending handlers). If autoSave is false, then the cache is
  222.     emptied when one of two conditions is met: when the number of dirty
  223.     pages exceeds maxDirtyPages, or when memory is low enough to require the
  224.     space that the dirty pages are taking up.
  225.  
  226.     When to use it: Setting maxDirtyPages to 1 and autoSave to false is the
  227.     safest environment for running HyperPAD. However, it accesses the disk
  228.     constantly and is therefore slower.
  229.  
  230.     Examples:
  231.  
  232.     set the autoSave to true;
  233.  
  234.     set the autoSave to false;
  235.     set the maxDirtyPages to 2;
  236.  
  237.     To set the autoSave to false every time you start HyperPAD, put the
  238.     following handler in the pad script of your Home pad:
  239.  
  240.     handler startup;
  241.     begin
  242.       set the autoSave to false;
  243.     end;
  244.  
  245.     Comments: The autoSave property is true by default.
  246.  
  247.     When autoSave is true:
  248.  
  249.     1.  You stand to lose less information if there's a power failure.
  250.  
  251.     2.  Disk access is kept to a periodic short burst.
  252.  
  253.     3.  Disk space is monitored closely, and you are notified when disk
  254.     space is low.
  255.  
  256.     When autoSave is false:
  257.  
  258.     1.  Disk access is less frequent, but takes more time when it does
  259.     occur.
  260.  
  261.     2.  Thrashing (continual disk accessing) can occur, depending on your
  262.     application. For example, if there are 50 pages in the cache that need
  263.     to be saved to disk, every time you switch to a new page, a page from
  264.     the cache has to be saved, causing the disk to be accessed.
  265.  
  266.     3.  Since disk space is determined after each write, you may have
  267.     information that needs to be saved to disk when there is insufficient
  268.     disk space.
  269.  
  270.     See Also:  maxDirtyPages
  271.  
  272.  
  273.  
  274.     ________________________________________________________________________
  275.                                              Chapter 12: Properties   151
  276.     ________________________________________________________________________
  277.  
  278.  
  279.     -----------------------------------
  280.     BAUD
  281.  
  282.     Purpose: Sets the baud rate for use with the dial command. You can set
  283.     the baud property to any baud supported by your modem (300, 1200, 2400,
  284.     9600). The dial command will not work if you set baud to an unusable
  285.     value. The default baud rate is 300.
  286.  
  287.     Examples:
  288.  
  289.     set the baud to 300;
  290.  
  291.     set the baud to item i of "300,1200,2400,9600";
  292.  
  293.     See Also: modem, stopBits, parity, and dataBits
  294.  
  295.     -----------------------------------
  296.     CURRENTDIRECTORY
  297.  
  298.     Purpose: This property gets or sets the current DOS directory. You can
  299.     set the directory to partial directory names as well. For example, if
  300.     you want to set the directory to the parent:
  301.  
  302.     set the currentDirectory to "..";
  303.  
  304.     If you include a drive specifier, HyperPAD will also change the current
  305.     drive. The following example changes to the S: drive and the directory
  306.     called ACCOUNTS\JOHN:
  307.  
  308.     set the currentDirectory to "S:\ACCOUNTS\JOHN";
  309.  
  310.     Examples:
  311.  
  312.     put the currentDirectory into the msg;
  313.  
  314.     set the currentDirectory to "D:";
  315.  
  316.     set the currentDirectory to "C:\123";
  317.  
  318.     The following example runs MS-WORD from within a document directory and
  319.     loads a document named MYDOC.DOC from the document directory.
  320.  
  321.     set the currentDirectory to "C:\DOCUMENT\PROJECT";
  322.     run "C:\WORD5\WORD MYDOC";
  323.  
  324.     Abbreviations: curDir
  325.  
  326.     See Also: directory
  327.  
  328.  
  329.  
  330.     ________________________________________________________________________
  331.                                              Chapter 12: Properties   152
  332.     ________________________________________________________________________
  333.  
  334.  
  335.     -----------------------------------
  336.     CURSOR
  337.  
  338.     Purpose: Sets the hardware text cursor (the blinking cursor) shape to an
  339.     underscore (thin), a full character block (fat), or invisible (off).
  340.  
  341.     When to use it: If you want to make the cursor change shape to indicate
  342.     the cursor's entry into different portions of your application (such as
  343.     entering buttons and fields).
  344.  
  345.     If you set the cursor shape to off (not visible) the cursor will be
  346.     invisible until you change the shape to either thin or fat.
  347.  
  348.     Examples:
  349.  
  350.     set the cursor to thin;
  351.  
  352.     if the cursor is off then
  353.       put "no one has the focus" into msg;
  354.  
  355.     See Also: cursorLoc, cursorX, cursorY
  356.  
  357.     -----------------------------------
  358.     CURSORLOC
  359.  
  360.     Purpose: The cursorLoc property allows you to set or get the location of
  361.     the hardware text cursor (the blinking cursor). The position is returned
  362.     in the form "X,Y" where X is the horizontal position and Y is the
  363.     vertical position with respect to the upper left corner of the screen.
  364.  
  365.     The range of values for the cursor location are:
  366.  
  367.     1 <= X <= screenWidth()    (usually 80)
  368.     1 <= Y <= screenHeight()   (usually 25)
  369.  
  370.     Examples:
  371.  
  372.     put the cursorLoc into cl; -- puts X,Y into "cl"
  373.  
  374.     set the cursorLoc to 10,12 -- set it somewhere
  375.  
  376.     if the screenHeight is 43 then
  377.       set the cursorLoc to 1,43
  378.  
  379.     See Also: cursor, cursorX, cursorY
  380.  
  381.  
  382.  
  383.     ________________________________________________________________________
  384.                                              Chapter 12: Properties   153
  385.     ________________________________________________________________________
  386.  
  387.  
  388.     -----------------------------------
  389.     DATABITS
  390.  
  391.     Purpose: Sets or gets the serial port property dataBits to
  392.     either 7 or 8 for use with the dial command. The default value is 7.
  393.  
  394.     Examples:
  395.  
  396.     set the dataBits to 7;
  397.  
  398.     set the dataBits to 8;
  399.  
  400.     See Also: baud, stopBits, parity, modem
  401.  
  402.     -----------------------------------
  403.     FILESORTMETHOD
  404.  
  405.     Purpose: The fileSortMethod property determines how a list
  406.     of files is sorted when it is read from disk. It can have the following
  407.     values:
  408.  
  409.     Method Value:     Sorted by:
  410.     ---------------------------------------------
  411.     1                 Name (ascending)
  412.  
  413.     2                 Extension (ascending)
  414.  
  415.     3                 Size (ascending)
  416.  
  417.     4                 Date/Time (ascending)
  418.  
  419.     5                 Name (descending)
  420.  
  421.     6                 Extension (descending)
  422.  
  423.     7                 Size (descending)
  424.  
  425.     8                 Date/Time (descending)
  426.  
  427.     The fileSortMethod property only affects the values of future calls to
  428.     the files() and longFiles() functions.
  429.  
  430.     Examples:
  431.  
  432.     The following statements read in a directory list sorted by descending
  433.     size:
  434.  
  435.     set the fileSortMethod to 7;
  436.     put the longFiles into page field "List";
  437.  
  438.  
  439.  
  440.     ________________________________________________________________________
  441.                                              Chapter 12: Properties   154
  442.     ________________________________________________________________________
  443.  
  444.  
  445.     -----------------------------------
  446.     FOCUS
  447.  
  448.     Purpose: Use focus to change the focus to a particular button or field
  449.     on the page or background. When a button or field has the focus, it is
  450.     the current object and can be selected (button) or edited (field).
  451.  
  452.     You cannot set the focus to locked buttons or fields, or objects that
  453.     are completely covered by other objects.
  454.  
  455.     When to use it: Use focus to highlight the button or field the user will
  456.     most likely want to select.
  457.  
  458.     Examples:
  459.  
  460.     set the focus to page field 1;
  461.  
  462.     set the focus to button "initialize";
  463.  
  464.     The following handler (in a page script) sets the focus to the first
  465.     empty field on a page:
  466.  
  467.     handler openPage;
  468.     begin
  469.       put 1 into i;
  470.       while page field i is not empty AND
  471.             i < the number of page fields do
  472.         add 1 to i;
  473.       set the focus to page field i;
  474.     end;
  475.  
  476.     Comments: Changing the focus sends a closeButton/closeField message to
  477.     the current object and an openButton/openField message to the object
  478.     receiving the focus.
  479.  
  480.     -----------------------------------
  481.     LOCKMESSAGES
  482.  
  483.     Purpose: Use lockMessages to prevent HyperPAD from sending automatic
  484.     messages such as openPage, openButton, and openPad. The possible values
  485.     for lockMessages are true and false.
  486.  
  487.     When to use it: You may want to set lockMessages to true for the
  488.     following reasons:
  489.  
  490.     1.  To speed up execution of a script that cycles through many pages.
  491.     Since fewer messages are being sent automatically by HyperPAD, the
  492.     script will execute faster.
  493.  
  494.  
  495.  
  496.     ________________________________________________________________________
  497.                                              Chapter 12: Properties   155
  498.     ________________________________________________________________________
  499.  
  500.  
  501.     2.  When you want to go to another page (i.e. to gather some data) and
  502.     don't want to stay there, you can set lockMessages to true to avoid
  503.     sending the automatic messages (like openPage) to that page.
  504.  
  505.     Examples:
  506.  
  507.     set the lockMessages to true;
  508.  
  509.     The following example script retrieves some data from a pad called
  510.     "PIF.PAD". It sets the lockMessages property to true to avoid sending
  511.     automatic messages to that pad.
  512.  
  513.     set the lockMessages to true;
  514.     push this page;               -- remember where we are
  515.     go to pad "Phone";
  516.     get field "First Name";
  517.     pop page;                     -- go back there
  518.  
  519.     Comments: The default value of lockMessages is false. It is reset to
  520.     false when the next idle message is sent (at the end of all pending
  521.     handlers).
  522.  
  523.     Another reason to set the lockMessages property to true is to avoid
  524.     subtle recursion. Recursion occurs when a script either directly or
  525.     indirectly executes itself. The following example demonstrates a
  526.     recursion problem:
  527.  
  528.     handler closeField;
  529.     begin
  530.       go to the next page;
  531.     end;
  532.  
  533.     The above closeField hander goes to another page. However, changing to
  534.     another page sends closeField to the current field, thus executing the
  535.     same script again (recursion). The following script corrects this:
  536.  
  537.     handler closeField;
  538.     begin
  539.       set lockMessages to true;
  540.       go to the next page;
  541.     end;
  542.  
  543.     In this case, setting lockMessages to true prevents the second
  544.     closeField message (which is an automatic message) from being sent. (The
  545.     closePage and openPage messages that are normally sent when the page is
  546.     changed are not sent either.)
  547.  
  548.     See Also: lockRecent, lockScreen
  549.  
  550.  
  551.  
  552.     ________________________________________________________________________
  553.                                              Chapter 12: Properties   156
  554.     ________________________________________________________________________
  555.  
  556.  
  557.     -----------------------------------
  558.     LOCKRECENT
  559.  
  560.     Purpose: Setting lockRecent to true prevents HyperPAD from adding pages
  561.     to the recent list. By default this property is false.
  562.  
  563.     When HyperPAD moves from page to page (including moving between pads),
  564.     the order the pages are viewed is remembered in the recent list (the
  565.     list of most recently accessed pages). When you press F5 (or select Back
  566.     from the Go menu), HyperPAD accesses this list to take you back through
  567.     the pages you've just viewed.
  568.  
  569.     When to use it: If you need to go to another page temporarily and don't
  570.     want the user to cycle back to this page when pressing F5.
  571.  
  572.     Comments: The lockRecent property is reset to false when the next idle
  573.     message is sent (at the end of all pending handlers).
  574.  
  575.     Examples:
  576.  
  577.     set the lockRecent to true;
  578.  
  579.     The following example goes to the Home pad and retrieves the user's name
  580.     from the Preferences page, but doesn't allow the user to return there
  581.     when F5 is pressed.
  582.  
  583.     set the lockRecent to true;
  584.     push this page;
  585.     go home;
  586.     get page field "User Name" of page "Preferences";
  587.     pop page;
  588.  
  589.     -----------------------------------
  590.     LOCKSCREEN
  591.  
  592.     Purpose: Use lockScreen to freeze the screen, preventing HyperPAD from
  593.     changing what is currently displayed. This is useful if you want to
  594.     change to another page without seeing it.
  595.  
  596.     The value of lockScreen is either true or false, and is reset to false
  597.     (the default) when the next idle message is sent (at the end of all
  598.     pending handlers). If the value is true, the screen will be updated.
  599.  
  600.     When to use it: If you need to gather field contents from another pad,
  601.     but don't want the user to actually view that pad, set the lockScreen to
  602.     true.
  603.  
  604.  
  605.  
  606.     ________________________________________________________________________
  607.                                              Chapter 12: Properties   157
  608.     ________________________________________________________________________
  609.  
  610.  
  611.     Examples:
  612.  
  613.     set the lockScreen to true;
  614.  
  615.     get the lockScreen;
  616.     if it is true then beep;
  617.  
  618.     The following statements use lockScreen to hide the retrieval of the
  619.     user name from the Preferences page of the Home pad:
  620.  
  621.     set the lockScreen to true;
  622.     push this page;
  623.     go home;
  624.     get field "User Name" of page "Preferences";
  625.     pop page;
  626.     set the lockScreen to false;
  627.     answer "Hello there" && it;
  628.  
  629.     Comments: Setting lockScreen to true increments an internal counter by
  630.     1, setting it to false decrements this counter by 1.  When lockScreen is
  631.     0, it is false. This is useful if you have a handler that is called from
  632.     different places, sometimes when the screen is locked, and other times
  633.     when it is not. As long as you set the lockScreen back to false, the
  634.     value will be preserved, as in the following example:
  635.  
  636.               set the lockScreen to true;
  637.                          :
  638.                          :
  639.               set the lockScreen to false;
  640.  
  641.     Note: The dialog boxes associated with the answer, ask, and fileOpen
  642.     commands will be displayed regardless of the value of lockScreen.
  643.  
  644.     See also: lockMessages, lockRecent
  645.  
  646.     -----------------------------------
  647.     MARKERATTR
  648.  
  649.     Purpose: Use markerAttr to determine the color of the marker character
  650.     in all list box fields.
  651.  
  652.     By default, marked lines in list boxes are indicated by a right triangle
  653.     character (ASCII 16) to the left of the line. Setting the markerAttr
  654.     changes the color of these characters. You can select from a range of
  655.     colors between 0 and 25.
  656.  
  657.     If the markerAttr is set to 0 (the default), then the marker characters
  658.     are the same as the fillColor of the field they are in.
  659.  
  660.     If the markerChar is 0, then the markerAttr is used as the color of the
  661.     entire line.
  662.  
  663.  
  664.  
  665.     ________________________________________________________________________
  666.                                              Chapter 12: Properties   158
  667.     ________________________________________________________________________
  668.  
  669.  
  670.     Examples:
  671.  
  672.     set the markerAttr to yellow on red;
  673.  
  674.     set the marketAttr to 45;
  675.  
  676.     The following example makes the marked lines of a field reverse video by
  677.     disabling the character that normally appears to the left of marked
  678.     lines, and setting the color:
  679.  
  680.     set the markerChar to 0;
  681.     set the markerAttr to black on grey;
  682.  
  683.     The next example sets the markings back to the default:
  684.  
  685.     set the markerChar to 16;        -- triangle
  686.     set the markerAttr to 0;          -- use fillColor
  687.  
  688.     See Also: markerChar
  689.  
  690.     -----------------------------------
  691.     MARKERCHAR
  692.  
  693.     Purpose: Use the markerChar to set and get the value of the character
  694.     that is used to show marked lines within a list box field.
  695.  
  696.     When the user selects a line in a list box field, the markerChar appears
  697.     to the left of the line in order to show that it is marked. You can
  698.     change or remove the use of this character by modifying the markerChar.
  699.     The default character is 16, a right arrow (ASCII 16).
  700.  
  701.     To change the markerChar, you must supply the ASCII code of the
  702.     character you want. For example, if you wanted the lines to be marked
  703.     with the letter A, you would type:
  704.  
  705.     set the markerChar to charToNum("A");
  706.  
  707.     When to use it: If you don't want a marker to be used, or you want to
  708.     specify a different character.
  709.  
  710.     Examples:
  711.  
  712.     This example sets the marker characters to a yellow diamond:
  713.  
  714.     set the markerChar to 4;      -- diamond
  715.     set the markerAttr to yellow;
  716.  
  717.     Comments: Changing the markerChar affects the display of all list box
  718.     fields until you change the value or exit HyperPAD.
  719.  
  720.     See Also:  markerAttr
  721.  
  722.  
  723.  
  724.     ________________________________________________________________________
  725.                                              Chapter 12: Properties   159
  726.     ________________________________________________________________________
  727.  
  728.  
  729.     -----------------------------------
  730.     MAXDIRTYPAGES
  731.  
  732.     Purpose: HyperPAD stores pages in an area of memory called the cache.
  733.     When pages are modified in any way, they are considered "dirty". The
  734.     maximum number of modified pages in the cache is determined by this
  735.     property. The default is 20. The range of values is between 1 and 50.
  736.     When the number of modified pages exceeds the value of maxDirtyPages,
  737.     the dirty pages are written to the pad file.
  738.  
  739.     When to use it: Setting maxDirtyPages to 1 causes HyperPAD to save each
  740.     page as it is changed. This is the safest way to run HyperPAD, but also
  741.     the slowest.
  742.  
  743.     Examples:
  744.  
  745.     set the maxDirtyPages to 1;
  746.  
  747.     See Also: autoSave
  748.  
  749.     -----------------------------------
  750.     MODEM
  751.  
  752.     Purpose: The modem property establishes the serial port that the dial
  753.     command will use to communicate with your modem.
  754.     The modem property can be set to either "COM1" or "COM2". If you set the
  755.     modem property to the wrong port, the dial command will give you an
  756.     error.
  757.  
  758.     Examples:
  759.  
  760.     set the modem to "com1";
  761.     dial "555-1212";
  762.  
  763.     The following example sets modem to the user's choice of a serial port:
  764.  
  765.     answer "Where is your modem connected?" with
  766.        "COM1","COM2";
  767.     if it is not empty then set the modem to it;
  768.  
  769.     The next example sets up each of the parameters to use with dial:
  770.  
  771.     set the modem to "com1";      -- default
  772.     set the baud to 300;              -- default
  773.     set the stopBits to 1;          -- default
  774.     set the dataBits to 7;          -- default
  775.     set the parity to "even";    -- default
  776.     dial "555-1212";
  777.  
  778.     Comments: The default value is "COM1".
  779.  
  780.     See Also: baud, stopBits, parity, dataBits
  781.  
  782.  
  783.  
  784.     ________________________________________________________________________
  785.                                              Chapter 12: Properties   160
  786.     ________________________________________________________________________
  787.  
  788.  
  789.     -----------------------------------
  790.     MOUSE
  791.  
  792.     Purpose: The mouse property determines whether HyperPAD recognizes the
  793.     presence of a mouse. By default, the mouse is recognized (and on) a
  794.     mouse is connected to the system and the mouse driver is loaded.
  795.  
  796.     Setting this property to off causes HyperPAD to ignore the mouse, even
  797.     if a mouse is present and operational. If you set the mouse property to
  798.     off, you must reset it to on
  799.     in order to use the mouse.
  800.  
  801.     If you attempt to set the mouse property to on and there isn't a mouse
  802.     or the mouse software is not loaded, then the mouse property will remain
  803.     off (HyperPAD will not return an error).
  804.  
  805.     The possible values are on or off.
  806.  
  807.     When to use it: If you want to force the user to use the keyboard in
  808.     your pad, set the mouse to off.
  809.  
  810.     Examples:
  811.  
  812.     set the mouse to off;    -- turn mouse off, if present
  813.  
  814.     set the mouse to on;
  815.  
  816.     The next example determines if a mouse is present and available:
  817.  
  818.     set the mouse to on;
  819.     if the mouse is not on then
  820.       answer "You have no mouse";
  821.  
  822.     See also: mouseAttr, mouseChar, mouseLoc, mouseClick
  823.  
  824.     -----------------------------------
  825.     MOUSEATTR
  826.  
  827.     Purpose: The mouseAttr property controls the attribute component of the
  828.     mouse pointer.
  829.  
  830.     The mouse pointer in HyperPAD has two components, the mouseChar and the
  831.     mouseAttr, that determine its appearance. When HyperPAD draws the mouse
  832.     pointer, it performs the following steps:
  833.  
  834.     1.  If the mouseChar is not 0, then the character component of the mouse
  835.     pointer is set to the mouseChar.
  836.  
  837.     2.  If the mouseAttr is not 0, then the attribute component of the mouse
  838.     pointer is set to the mouseAttr.
  839.  
  840.  
  841.  
  842.     ________________________________________________________________________
  843.                                              Chapter 12: Properties   161
  844.     ________________________________________________________________________
  845.  
  846.  
  847.     Examples:
  848.  
  849.     set the mouseAttr = black on grey;    -- default
  850.  
  851.     set the mouseAttr to 76;
  852.  
  853.     set the mouseAttr to the color of page button 1;
  854.  
  855.     The following example adjusts both the attribute and the character
  856.     portion of the mouse pointer:
  857.  
  858.     if the graphicsCard is "Monochrome" then
  859.       begin
  860.         set the mouseAttr to 112;
  861.         set the mouseChar to 4;
  862.       end
  863.     else
  864.       begin
  865.         set the mouseAttr to 32;
  866.         set the mouseChar to chartonum("A");
  867.       end;
  868.  
  869.     The following makes the mouse invisible:
  870.  
  871.     set the mouseChar to 0;
  872.     set the mouseAttr to 0;
  873.  
  874.     Comments: The default mouseAttr is 112, which means that the mouse
  875.     pointer is a reverse video block. The range of values is from 0 to 25.
  876.  
  877.     When displaying the attribute, HyperPAD examines the attribute that is
  878.     already there at the location of the mouse pointer on the screen. If the
  879.     background color is the same as the background color of the mouseAttr,
  880.     then the foreground and background colors of the mouseAttr are swapped
  881.     before the mouse pointer is displayed.
  882.  
  883.     See Also: mouse, mouseChar, mouseLoc
  884.  
  885.  
  886.  
  887.     ________________________________________________________________________
  888.                                              Chapter 12: Properties   162
  889.     ________________________________________________________________________
  890.  
  891.  
  892.     -----------------------------------
  893.     MOUSECHAR
  894.  
  895.     Purpose: With mouseChar, you can set the character component of the
  896.     mouse pointer. The default mouseChar is 0, which means that the mouse
  897.     pointer is represented only by an attribute (a rectangular block of
  898.     color).
  899.  
  900.     To set the mouseChar, you need the ASCII value of the character you want
  901.     to represent the mouse pointer. If you don't know the ASCII value, you
  902.     can check it in the ASCII Char dialog box, or use charToNum() in your
  903.     script.
  904.  
  905.     When to use it: Modify the mouseChar to create a visual cue that the
  906.     mouse is on top of something. For example, you might change the pointer
  907.     into a question mark whenever it enters your Help button.
  908.  
  909.     Examples:
  910.  
  911.     set the mouseChar to 4;  -- set mouse pointer to diamond
  912.  
  913.     -- set the mouse Char to the letter A
  914.     set the mouseChar to chartonum("A");
  915.  
  916.     The following handlers (when placed in a page script) set the mouseChar
  917.     to a diamond whenever the mouse pointer is inside a button or field.
  918.     This gives the user a visual indication that the mouse can be pressed to
  919.     initiate an action.
  920.  
  921.     handler mouseEnter;
  922.     begin
  923.       set the mouseChar to 4;  -- diamond
  924.     end;
  925.  
  926.     handler mouseLeave;
  927.     begin
  928.       set the mouseChar to 0;  -- default is off
  929.     end;
  930.  
  931.     -----------------------------------
  932.     NUMBERFORMAT
  933.  
  934.     Purpose: The numberFormat property determines the precision in which
  935.     mathematical calculations are displayed. Internally, HyperPAD keeps
  936.     track of 19 digits of precision; however, when you put a number into the
  937.     message box or a field, it is displayed using the current numberFormat.
  938.  
  939.     The numberFormat is made up of zeros, pound signs, and a decimal point.
  940.     A zero to the left or right of the decimal point instructs HyperPAD to
  941.     place a digit or, if there is no digit, a 0 in that position. A pound
  942.     sign (#) to the right of the decimal point instructs HyperPAD to place a
  943.     digit at that position only if the internal number has a digit there.
  944.  
  945.  
  946.  
  947.     ________________________________________________________________________
  948.                                              Chapter 12: Properties   163
  949.     ________________________________________________________________________
  950.  
  951.  
  952.     The value of numberFormat has the following format:
  953.  
  954.     <zeros>.<zeros><pound signs>
  955.  
  956.     The following are legal number formats:
  957.  
  958.     "0000.000000"
  959.     "0.000######"
  960.     "00.#"
  961.     "0.#########"
  962.  
  963.     The following are not legal:
  964.  
  965.     Number format:     Not legal because:
  966.     -----------------------------------------------------------------------
  967.     ##00.00            ##s to the left of the decimal place have no meaning
  968.  
  969.     00.##00            ##s cannot be followed by zeros
  970.  
  971.     The following table shows some sample numbers and how they would appear
  972.     using some sample number formats:
  973.  
  974.     Number:              Number Format:        Looks Like:
  975.     --------------------------------------------------------------------
  976.     n3                   0.#####               3
  977.  
  978.     3.12                 0.#####               3.12
  979.  
  980.     3.66666666666667     0.#####               3.66667
  981.  
  982.     3                    00.00                 03.00
  983.  
  984.     3.1245               00.00                 03.12
  985.  
  986.     345.678              0.00##                345.68
  987.  
  988.     3                    0.00##                3.00
  989.  
  990.     3.123456789          0.00##                3.1235
  991.  
  992.     345.678              0.00##                345.678
  993.  
  994.     Examples:
  995.  
  996.     set the numberFormat to "0.00"; -- money format
  997.  
  998.     set the numberFormat to "0.00###";
  999.  
  1000.     The next example increases the current precision by 2 digits:
  1001.  
  1002.     get the numberFormat;
  1003.     set the numberFormat to it & "##";
  1004.  
  1005.  
  1006.  
  1007.     ________________________________________________________________________
  1008.                                              Chapter 12: Properties   164
  1009.     ________________________________________________________________________
  1010.  
  1011.  
  1012.     The final example changes all background fields to use a new number
  1013.     format:
  1014.  
  1015.     ask "New Number Format" with the numberFormat;
  1016.     set the numberFormat to it;
  1017.     for i=1 to the number of fields do
  1018.       put (field i)*1 into field i;
  1019.  
  1020.     Comments: The default numberFormat is "0.######". HyperPAD resets when
  1021.     the next idle message is sent (at the end of all pending handlers).
  1022.  
  1023.     The numberFormat property will not affect the presentation of a number
  1024.     that is already displayed unless you first perform an arithmetic
  1025.     operation on it. If you don't want the value changed, simply multiply it
  1026.     by 1:
  1027.  
  1028.     set the numberFormat to "0.00";
  1029.     multiply field 1 by 1;
  1030.  
  1031.     -----------------------------------
  1032.     PAINTATTR
  1033.  
  1034.     Purpose: The paintAttr property is used to get or set the current value
  1035.     of the Paint Attribute. The valid range of values is from 0 to 255.
  1036.  
  1037.     You can also set this property using the Paint Attr command on the
  1038.     Workspace menu.
  1039.  
  1040.     Examples:
  1041.  
  1042.     set the paintAttr to 31;
  1043.  
  1044.     set the paintAttr to red on yellow;
  1045.  
  1046.     if the paintAttr is 78 then
  1047.       answer "you have changed the attribute";
  1048.  
  1049.     set the mouseAttr to the paintAttr;
  1050.  
  1051.     The following handler forces the user to change the current paint
  1052.     attribute:
  1053.  
  1054.     handler select;
  1055.     begin
  1056.       put the paintAttr into saved;
  1057.       repeat
  1058.         doMenu "paint"; -- paint tool
  1059.         doMenu "Paint Attr...";   -- get the box
  1060.       until the paintAttr is not saved;
  1061.     end;
  1062.  
  1063.     See Also: asciiChar
  1064.  
  1065.  
  1066.  
  1067.     ________________________________________________________________________
  1068.                                              Chapter 12: Properties   165
  1069.     ________________________________________________________________________
  1070.  
  1071.  
  1072.     -----------------------------------
  1073.     PARITY
  1074.  
  1075.     Purpose: This property sets the parity to either even, odd, or none for
  1076.     use with the dial command. The default is even.
  1077.  
  1078.     Examples:
  1079.  
  1080.     See the section on the MODEM property.
  1081.  
  1082.     See Also: baud, stopBits, modem, dataBits, parity
  1083.  
  1084.     -----------------------------------
  1085.     PRINTDEVICE
  1086.  
  1087.     Purpose: This property allows you to establish where HyperPAD will send
  1088.     printed output. You can specify either "LPT1", "LPT2", "COM1", "COM2" or
  1089.     any valid DOS filename. You can also set the print device manually
  1090.     through the Print Setup dialog box by changing the Print To setting.
  1091.  
  1092.     Examples:
  1093.  
  1094.     set the printDevice to "LPT1";
  1095.  
  1096.     if the printDevice is "LPT2" then
  1097.     answer "You don't have an LPT2 printer port";
  1098.  
  1099.     set the printDevice to "C:\HPAD\OUTPUT\STUFF.LST";
  1100.  
  1101.     The following example prints two fields, "first name" and "last name",
  1102.     from every page of a pad to a file called "OUTPUT.LST". The previous
  1103.     value of printDevice is saved and restored.
  1104.  
  1105.     put the printDevice into savedPrintDevice;
  1106.     set the printDevice to "OUTPUT.LST";
  1107.     set the printer to on;
  1108.     for i = 1 to the number of pages do
  1109.       print field "First Name" && field "Last Name";
  1110.     set the printer to off;
  1111.     set the printDevice to savedPrintDevice;
  1112.  
  1113.     Comments: LPT1 is the default printDevice.
  1114.  
  1115.     HyperPAD uses MS-DOS to perform its printing. Thus, any name that you
  1116.     specify must be a valid DOS filename.
  1117.  
  1118.     Once you set printDevice, it will remain unchanged until you change it
  1119.     again. The value is saved in your HPAD.INI file.
  1120.  
  1121.     Abbreviations: printDev
  1122.  
  1123.     See Also: print, printer, printerTranslation
  1124.  
  1125.  
  1126.  
  1127.     ________________________________________________________________________
  1128.                                              Chapter 12: Properties   166
  1129.     ________________________________________________________________________
  1130.  
  1131.  
  1132.     -----------------------------------
  1133.     PRINTER
  1134.  
  1135.     Purpose: You can use this property to turn the printer on and off. When
  1136.     printer is on, you can use the print command to send text out to the
  1137.     printer; if it's off, using the print command will cause a
  1138.     runtime error.
  1139.  
  1140.     Examples:
  1141.  
  1142.     set the printer to on;
  1143.  
  1144.     set the printer to off;
  1145.  
  1146.     The following example prints out all the background button scripts from
  1147.     the current pad:
  1148.  
  1149.     set the printer to on;  -- start the print job
  1150.     for i=1 to the number of pages do
  1151.       begin
  1152.         go to page i;
  1153.         for j = 1 to the number of bkgnd btns do
  1154.           print the script of bkgnd btn j;
  1155.       end;
  1156.     set the printer to off;  -- finished printing
  1157.  
  1158.     Comments: The printer property is automatically set to off when you exit
  1159.     HyperPAD, run a program using Run Program on the File menu or use the
  1160.     run command (from a script).
  1161.  
  1162.     See Also: print, printDevice, printerTranslation
  1163.  
  1164.     -----------------------------------
  1165.     PRINTERTRANSLATION
  1166.  
  1167.     Purpose: Setting this property modifies how HyperPAD translates
  1168.     characters that you send to your printer using the print command.
  1169.  
  1170.     When printerTranslation is true (the default), HyperPAD performs the
  1171.     following translations:
  1172.  
  1173.     Character:     carriage-return
  1174.     ASCII Value:        13
  1175.     Translates To:      13,10
  1176.  
  1177.     Notes:    Changes the internal print position to the next line
  1178.  
  1179.     Character :     formfeed
  1180.     ASCII Value:       12
  1181.     Translates To:     12
  1182.  
  1183.     Notes:    Resets the internal print position to 1,1
  1184.  
  1185.  
  1186.  
  1187.     ________________________________________________________________________
  1188.                                              Chapter 12: Properties   167
  1189.     ________________________________________________________________________
  1190.  
  1191.  
  1192.     When printerTranslation is false, no translation is performed. This
  1193.     enables you to send special escape sequences to your printer to control
  1194.     various printer options.
  1195.  
  1196.     Examples:
  1197.  
  1198.     set the printerTranslation to false;
  1199.  
  1200.     The following example sends an escape sequence to an IBM Proprinter to
  1201.     print in NLQ mode (near letter quality):
  1202.  
  1203.     set the printerTranslation to false;
  1204.     print numToChar(27) & H;
  1205.  
  1206.     Comments: HyperPAD resets printerTranslation to
  1207.     true (the default) when the next idle message is sent (at the end of all
  1208.     pending handlers).
  1209.  
  1210.     -----------------------------------
  1211.     SELECTEDTEXT
  1212.  
  1213.     Purpose: Use selectedText to determine what text is currently
  1214.     highlighted in a field or the message box.
  1215.  
  1216.     When the user highlights text in a field (using SHIFT+Arrow keys or by
  1217.     dragging the mouse), HyperPAD copies the highlighted text to the
  1218.     selectedText. The text will remain in the selectedText until you
  1219.     highlight something else, exit HyperPAD, or run another program.
  1220.  
  1221.     Setting the selectedText does not highlight the text on the screen. This
  1222.     is accomplished using the hilite command.
  1223.  
  1224.     Example:
  1225.  
  1226.     put the selectedText into the message box;
  1227.  
  1228.     set the selectedText to empty;
  1229.  
  1230.     The following handler finds the selectedText:
  1231.  
  1232.     handler select;
  1233.     begin
  1234.       if the selectedText is not empty then
  1235.         find the selectedText;
  1236.     end;
  1237.  
  1238.     See Also: hilite
  1239.  
  1240.  
  1241.  
  1242.     ________________________________________________________________________
  1243.                                              Chapter 12: Properties   168
  1244.     ________________________________________________________________________
  1245.  
  1246.  
  1247.     -----------------------------------
  1248.     STOPBITS
  1249.  
  1250.     Purpose: Sets the stopBits for use with the dial command. The possible
  1251.     values are 1 or 2. This value is used to initialize the serial port
  1252.     before using the dial command.
  1253.  
  1254.     Examples:
  1255.  
  1256.     set the stopBits to 2;
  1257.  
  1258.     set the stopBits to 1;
  1259.  
  1260.     See Also: modem, baud, parity, dataBits,dial
  1261.  
  1262.     -----------------------------------
  1263.     TABBING
  1264.  
  1265.     Purpose: Use the tabbing property to control the behavior of the TAB key
  1266.     when moving from object to object on the page.
  1267.  
  1268.     When you press the TAB key, the focus is taken away from the current
  1269.     button or field and given to the next button or field. The next object
  1270.     that receives the focus is determined by the tabbing property, which can
  1271.     be set to either position or layer.
  1272.  
  1273.     If tabbing is set to layer, then the next object to receive the focus
  1274.     depends on the order which the objects sit on the page. Each button and
  1275.     field is on its own transparent layer, these layers are stacked on top
  1276.     of one another. Pressing TAB moves the focus to the object in the next
  1277.     layer higher (i.e. from page button 1 to page button 2).
  1278.  
  1279.     If tabbing is set to position (the default), then the next object is
  1280.     determined by the object's position relative to the current one on the
  1281.     page. HyperPAD looks for objects to the right and then down on the page.
  1282.     If there aren't any, then the object closest to the upper left corner of
  1283.     the screen receives the focus.
  1284.  
  1285.     When to use it: Use this property to make the movement between the
  1286.     buttons and fields in your pads as logical as possible.
  1287.  
  1288.     Examples:
  1289.  
  1290.     set the tabbing to position;
  1291.  
  1292.     handler openPage;
  1293.     begin
  1294.       set the tabbing to layer;
  1295.     end;
  1296.  
  1297.  
  1298.  
  1299.     ________________________________________________________________________
  1300.                                              Chapter 12: Properties   169
  1301.     ________________________________________________________________________
  1302.  
  1303.  
  1304.     -----------------------------------
  1305.     USERLEVEL
  1306.  
  1307.     Purpose: Use the userLevel property to limit access to your pad. You can
  1308.     modify this property with the Protect command on the File menu.
  1309.  
  1310.     Within HyperPAD, the commands you can access from the menus are
  1311.     determined by the userLevel. You can set the user level to one of five
  1312.     values. The higher the value, the more power HyperPAD gives the user.
  1313.  
  1314.     The numbers 1 through 5 correspond to the userLevel in the following
  1315.     way:
  1316.  
  1317.     Number:    User Level:
  1318.     --------------------------------------
  1319.     1          Browsing
  1320.  
  1321.     2          Typing
  1322.  
  1323.     3          Painting
  1324.  
  1325.     4          Authoring
  1326.  
  1327.     5          Scripting
  1328.  
  1329.     As you change userLevel, the menus change to reflect the new
  1330.     capabilities HyperPAD gives you (or takes away!).
  1331.  
  1332.     The userLevel property can be set by the pad's user using the Protect
  1333.     dialog box on the File menu. The userLevel is saved with the pad, so
  1334.     that the next time you use the pad, it has the same user level.
  1335.  
  1336.     If you attempt to change the userLevel of a pad that currently has a
  1337.     password, then you will be asked for the password. The userLevel will
  1338.     remain unchanged if you give the wrong password or select <Cancel> from
  1339.     the Password dialog box.
  1340.  
  1341.     When to use it: If you want to limit the pad user's ability to alter the
  1342.     pad, or if you want to allow some changes but not others, you'll need to
  1343.     change the userLevel.
  1344.  
  1345.     Examples:
  1346.  
  1347.     set the userLevel to 5;
  1348.  
  1349.     set the userLevel to 1;
  1350.  
  1351.  
  1352.  
  1353.     ________________________________________________________________________
  1354.                                              Chapter 12: Properties   170
  1355.     ________________________________________________________________________
  1356.  
  1357.  
  1358.     The following handler sets the userLevel on entry to a pad. It sets a
  1359.     higher level if the user knows a certain password:
  1360.  
  1361.     handler openPad;
  1362.     begin
  1363.       ask "What is the password?";
  1364.       if it is "FANCY" then set the userLevel to 5
  1365.       else set the userLevel to 2;
  1366.     end;
  1367.  
  1368.     See Also: passwordOnly
  1369.  
  1370.  
  1371.  
  1372.     ________________________________________________________________________
  1373.                                              Chapter 12: Properties   171
  1374.     ________________________________________________________________________
  1375.  
  1376.  
  1377.     PAD PROPERTIES
  1378.  
  1379.     The following section describes the properties of a pad. You can change
  1380.     a pad property using the set command, as in the following example:
  1381.  
  1382.     set the cantDelete of pad to true;
  1383.  
  1384.     -----------------------------------
  1385.     CANTDELETE
  1386.  
  1387.     Purpose: Setting this property to true prevents a pad from being
  1388.     deleted. When cantDelete is false, the pad can be deleted using Delete
  1389.     Pad command on the File menu.
  1390.  
  1391.     Changing this value changes the value of the Can't delete option in the
  1392.     Protect dialog box.
  1393.  
  1394.     When to use it: Set cantDelete to true when you want to protect your
  1395.     pads from being accidentally deleted from within HyperPAD.
  1396.  
  1397.     Examples:
  1398.  
  1399.     set the cantDelete of pad to false;
  1400.  
  1401.     if the userLevel <= 2 then
  1402.       set the cantDelete of pad to true;
  1403.  
  1404.     Comments: This property does not prevent you from deleting the pad using
  1405.     the DOS Delete command (it doesn't modify the DOS file attributes).
  1406.  
  1407.     See Also:  cantModify
  1408.  
  1409.     -----------------------------------
  1410.     CANTMODIFY
  1411.  
  1412.     Purpose: The cantModify property allows you to determine whether the
  1413.     pad's user can make modifications to a pad.
  1414.     When the value of cantModify is false, you can change the information in
  1415.     a pad within the constraints of the current user level.
  1416.  
  1417.     When cantModify is true, the pad cannot be changed. Thus, you are
  1418.     prevented from typing into fields, painting, modifying an object's
  1419.     position and properties, and modifying an object's script. Pads of this
  1420.     type (with cantModify set to true) are read-only and cannot be
  1421.     physically modified by HyperPAD. Furthermore, more than one user on a
  1422.     network can browse read-only pads at the same time.
  1423.  
  1424.     Changing the value of this property changes the value of the Read only
  1425.     option in the Protect dialog box.
  1426.  
  1427.  
  1428.  
  1429.     ________________________________________________________________________
  1430.                                              Chapter 12: Properties   172
  1431.     ________________________________________________________________________
  1432.  
  1433.  
  1434.     When to use it: If you want to allow a pad to be shared on a network, or
  1435.     if you want to further restrict the pad user from modifying it.
  1436.  
  1437.     Examples:
  1438.  
  1439.     set the cantModify of pad to true;
  1440.  
  1441.     The following handler in a pad script changes the userLevel to scripting
  1442.     if there are no other users accessing the pad on a network; otherwise,
  1443.     the pad is opened in read-only mode:
  1444.  
  1445.     hander openPad;
  1446.     begin
  1447.       if the cantModify of pad is true then
  1448.         being
  1449.           set the cantModify of pad to false;
  1450.           if the cantModify of pad is false then
  1451.             set the userLevel to 5;
  1452.         end;
  1453.     end;
  1454.  
  1455.     Comments: Scripts can still modify the contents of fields and the
  1456.     properties of buttons. However, these changes will not be saved to disk.
  1457.  
  1458.     See Also: cantDelete, passwordOnly
  1459.  
  1460.     -----------------------------------
  1461.     LONGNAME
  1462.  
  1463.     Purpose: Use this property to determine the full DOS pathname of the
  1464.     current pad, including a drive letter, like the following example:
  1465.  
  1466.     C:\HPAD\HOME.PAD
  1467.  
  1468.     Note:  You cannot modify the longName of a pad; in order to change the
  1469.     path of a pad you must copy it through DOS or the DOS pad.
  1470.  
  1471.     Examples:
  1472.  
  1473.     put the longName of pad into pname;
  1474.  
  1475.     get the longName of pad;
  1476.     if the first character of it is in "AB" then
  1477.       answer "You are on a removable disk.";
  1478.  
  1479.     See Also: name
  1480.  
  1481.  
  1482.  
  1483.     ________________________________________________________________________
  1484.                                              Chapter 12: Properties   173
  1485.     ________________________________________________________________________
  1486.  
  1487.  
  1488.     -----------------------------------
  1489.     NAME
  1490.  
  1491.     Purpose: Use the name property to get or set the name of a pad. The
  1492.     value of name will be the DOS name of the pad without the extension. If
  1493.     you set the name of a pad, you will change the actual DOS name.
  1494.  
  1495.     Examples:
  1496.  
  1497.     if the name of pad is "HOME" then
  1498.       answer "You are home now!";
  1499.  
  1500.     The following example changes the name to one that the user specifies:
  1501.  
  1502.     ask "New name for pad:" with the name of pad;
  1503.     if it is empty then exit;
  1504.     if "." is not in it then put ".PAD" after it;
  1505.     set the name of pad to it;
  1506.     if the name of the pad is not it then
  1507.       answer "Unable to change the name" with "Ok";
  1508.  
  1509.     See Also: longName
  1510.  
  1511.     -----------------------------------
  1512.     PASSWORDONLY
  1513.  
  1514.     Purpose: This property determines whether a pad is accessible by
  1515.     password only.
  1516.  
  1517.     You can require that the user enter the correct password in order to
  1518.     access the pad for the first time in a HyperPAD session. Setting this
  1519.     property modifies the By Password Only option in the Protect dialog box.
  1520.  
  1521.     If you attempt to set passwordOnly to true and no password has been
  1522.     chosen, you will be prompted to enter one. If you cancel the Password
  1523.     dialog box, the property will not be changed.
  1524.  
  1525.     When passwordOnly is true, you must type in the password when you open
  1526.     the pad for the first time (you only have to give the password once per
  1527.     HyperPAD session). If you change the user level after accessing the pad,
  1528.     you must enter the password again.
  1529.  
  1530.     When to use it: When you want to protect your pad from being browsed by
  1531.     other users.
  1532.  
  1533.     Examples:
  1534.  
  1535.     set the passwordOnly of pad to true;
  1536.  
  1537.     set the passwordOnly of pad to (the userLevel >= 4);
  1538.  
  1539.     See Also: cantModify, cantDelete, userLevel
  1540.  
  1541.  
  1542.  
  1543.     ________________________________________________________________________
  1544.                                              Chapter 12: Properties   174
  1545.     ________________________________________________________________________
  1546.  
  1547.  
  1548.     -----------------------------------
  1549.     SCRIPT
  1550.  
  1551.     Purpose: Use the script property to get or replace the current script of
  1552.     the pad. The value of script is a text string composed of lines
  1553.     separated by carriage returns.
  1554.  
  1555.     Setting this property replaces the current pad script with a new one.
  1556.     The new script must be compiled and checked for errors. Any handlers
  1557.     within the new script that contain errors will not be compiled.
  1558.     Getting the script allows you to view it or paste it into another
  1559.     script.
  1560.  
  1561.     When to use it: When you want to alter a script without using the Script
  1562.     Editor.
  1563.  
  1564.     Examples:
  1565.  
  1566.     put the script of pad into stext;
  1567.  
  1568.     set the script of pad to stext;
  1569.  
  1570.     set the script of pad to empty;
  1571.  
  1572.     The next example creates an openPad handler by appending text together
  1573.     (using the & operator) and attaching the new openPad handler to the end
  1574.     of the pad script. The new handler beeps when the pad is opened.
  1575.  
  1576.     set the script of pad to the script of the pad &
  1577.       return & return &
  1578.       "handler openPad;" & return &
  1579.       "begin" & return &
  1580.       "  beep;" & return &
  1581.       "end;" & return;
  1582.  
  1583.     The next example changes the script of page button 2 to a new script
  1584.     that causes the button to go to page 4 when selected.
  1585.  
  1586.     handler select;
  1587.     begin
  1588.       set the script of page button 2 to
  1589.       "handler select;" & return &
  1590.       "begin" & return &
  1591.       "  go to page 4;" & return &
  1592.       "end;";
  1593.     end;
  1594.  
  1595.     See Also: edit script
  1596.  
  1597.  
  1598.  
  1599.     ________________________________________________________________________
  1600.                                              Chapter 12: Properties   175
  1601.     ________________________________________________________________________
  1602.  
  1603.  
  1604.     FIELD PROPERTIES
  1605.  
  1606.     -----------------------------------
  1607.     ACCELERATORCOLOR
  1608.  
  1609.     Purpose: The acceleratorColor property determines the color of a given
  1610.     accelerator key when the ALT key is pressed. Any field in your pad can
  1611.     be assigned an accelerator key, which allows you to set the focus to
  1612.     that field quickly. An acceleratorKey must be set for a field and the
  1613.     showName property must be true for acceleratorColor to have an effect.
  1614.  
  1615.     You cannot set the accelerator key or color of a field using the Field
  1616.     Info dialog box like you can with buttons. The only way to do this is
  1617.     through the message box or a script.
  1618.  
  1619.     The range of values is from 0 to 25. The default is 7.
  1620.  
  1621.     Examples:
  1622.  
  1623.     set the acceleratorColor of page field 3 to red on blue;
  1624.  
  1625.     Abbreviations: accelColor
  1626.  
  1627.     See Also: acceleratorKey, showName
  1628.  
  1629.     -----------------------------------
  1630.     ACCELERATORKEY
  1631.  
  1632.     Purpose: The acceleratorKey property defines the character within the
  1633.     field's name that the user can press to quickly go to that field. The
  1634.     acceleratorKey is highlighted when the user holds down ALT. For example,
  1635.     if a field's acceleratorKey is "A", the key combination ALT+A will set
  1636.     the focus to that field.
  1637.  
  1638.     If the acceleratorKey can't be found within the field's name, then it
  1639.     will not be highlighted when ALT is pressed. However, the field can
  1640.     still be accessed with the ALT key combination.
  1641.  
  1642.     Accelerator keys can be any letter or number (A..Z, 0..9).
  1643.  
  1644.     Example:
  1645.  
  1646.     set the accelKey of field "First Name" to "E";
  1647.  
  1648.     Comments: Make sure you select a unique key code for the accelerator
  1649.     key. If it isn't, then the field or button lowest in the hierarchy will
  1650.     get the focus first. Further, be careful not to create accelerator keys
  1651.     that conflict with the menu accelerators.
  1652.     Abbreviations: accelKey
  1653.  
  1654.     See Also: acceleratorColor, showName
  1655.  
  1656.  
  1657.  
  1658.     ________________________________________________________________________
  1659.                                              Chapter 12: Properties   176
  1660.     ________________________________________________________________________
  1661.  
  1662.  
  1663.     -----------------------------------
  1664.     ALIGN
  1665.  
  1666.     Purpose: Use the align property to set or get the text
  1667.     justification of a field. By default, text in fields is left aligned.
  1668.  
  1669.     You can set align to left, right, or centered.
  1670.  
  1671.     Examples:
  1672.  
  1673.     set the align of page field 1 to right;
  1674.  
  1675.     The next example randomly aligns text in all the fields of a page:
  1676.  
  1677.     put "left,right,centered" into settings;
  1678.     for i = 1 to the number of page fields do
  1679.       begin
  1680.         set the align of page field i to
  1681.           item (random(3)) of settings;
  1682.     end;
  1683.  
  1684.     -----------------------------------
  1685.     AUTOHILITE
  1686.  
  1687.     Purpose: Use  this property to determine whether a field is highlighted
  1688.     when it receives the focus. The value  can be true or false.
  1689.  
  1690.     Example:
  1691.  
  1692.     set the autoHilite of field "Address" to true;
  1693.  
  1694.     -----------------------------------
  1695.     BORDERCOLOR
  1696.  
  1697.     Purpose: The borderColor property sets or gets the color of a field's
  1698.     border. The borderColor property will have no effect if withEdge is
  1699.     false or the style is transparent.
  1700.  
  1701.     The range of colors is from 0 to 255; the default is 7 (grey on black).
  1702.  
  1703.     This property can also be modified through the Field Info property box.
  1704.  
  1705.     Examples:
  1706.  
  1707.     set the borderColor of page field 1 to 7; -- the default
  1708.  
  1709.     if the style of field "Notes" is not transparent then
  1710.       set the borderColor of field 1 to yellow on red;
  1711.  
  1712.     See Also: color, fillColor, nameColor, hiliteColor
  1713.  
  1714.  
  1715.  
  1716.     ________________________________________________________________________
  1717.                                              Chapter 12: Properties   177
  1718.     ________________________________________________________________________
  1719.  
  1720.  
  1721.     -----------------------------------
  1722.     COLOR
  1723.  
  1724.     Purpose: The color property allows you to determine or change the
  1725.     fillColor and borderColor of a field.
  1726.  
  1727.     When used with the set command, this property modifies both the
  1728.     fillColor and the borderColor properties of a field. When used with the
  1729.     get or put commands, the value of this property is the fillColor of the
  1730.     field.
  1731.  
  1732.     The valid colors are in the range 0 to 255; the default is 7 (grey on
  1733.     black).
  1734.  
  1735.     Examples:
  1736.  
  1737.     set the color of field 1 to 31;
  1738.  
  1739.     set the color of page field "Notes" to blue on white;
  1740.  
  1741.     Comments: This property can also be modified through the Field Info
  1742.     dialog box.
  1743.  
  1744.     See Also: fillColor, borderColor, nameColor, hiliteColor
  1745.  
  1746.     -----------------------------------
  1747.     CURRENTLINE
  1748.  
  1749.     Purpose: Use currentLine to retrieve the line number of the current
  1750.     insert point within a field.
  1751.  
  1752.     The currentLine property returns the line number as it appears on the
  1753.     screen (not the line number as determined by carriage returns).
  1754.  
  1755.     This value cannot be changed. You can change the insertion location
  1756.     within the text using the insertPoint property.
  1757.  
  1758.     Examples:
  1759.  
  1760.     put the currentLine of field 1 into cline;
  1761.  
  1762.     get the currentLine of field "Notes" of page 2;
  1763.  
  1764.     The following makes the current line the first line displayed:
  1765.  
  1766.     set startLine of field 1 to the currentLine of field 1;
  1767.  
  1768.     See Also: insertPoint
  1769.  
  1770.  
  1771.  
  1772.     ________________________________________________________________________
  1773.                                              Chapter 12: Properties   178
  1774.     ________________________________________________________________________
  1775.  
  1776.  
  1777.     -----------------------------------
  1778.     EDGETYPE
  1779.  
  1780.     Purpose: The edgeType property determines the current edge type of a
  1781.     field. You can choose different characters to define the borders of a
  1782.     field. The valid edge types are 1 to 15. The default is 1, which is a
  1783.     single width line. The edgeType will only have an effect if the value of
  1784.     withEdge is true.
  1785.  
  1786.     Appendix 3 shows the available edge types and their corresponding
  1787.     values.
  1788.  
  1789.     This property can also be modified through the Field Info dialog box.
  1790.  
  1791.     Examples:
  1792.  
  1793.     set the edgeType of page field "Zip Code" to 7;
  1794.  
  1795.     put the edgeType of field 1 into the message box;
  1796.  
  1797.     The next two handlers in a field script change the border to a double
  1798.     line when the field is opened for editing and the changes the border
  1799.     back to a single line when the field is closed. This provides an
  1800.     additional visual cue for the user that the field is open for editing:
  1801.  
  1802.     handler openField;
  1803.     begin
  1804.       set the edgeType of me to 2;
  1805.     end;
  1806.  
  1807.     handler closeField;
  1808.     begin
  1809.       set the edgeType of me to 1;
  1810.     end;
  1811.  
  1812.     See Also: withEdge, borderColor
  1813.  
  1814.  
  1815.  
  1816.     ________________________________________________________________________
  1817.                                              Chapter 12: Properties   179
  1818.     ________________________________________________________________________
  1819.  
  1820.  
  1821.     -----------------------------------
  1822.     FILLCOLOR
  1823.  
  1824.     Purpose: Use the fillColor property to set or get the color of the
  1825.     interior portion of a field. If the field is style is transparent,
  1826.     fillColor will have no effect.
  1827.  
  1828.     The valid range of colors is from 0 to 255; the default is 7 (grey on
  1829.     black).
  1830.  
  1831.     This property can also be modified through the Field Info dialog box.
  1832.  
  1833.     Examples:
  1834.  
  1835.     set the fillColor of field 1 to red;
  1836.  
  1837.     set the fillColor of field 2 to 31;
  1838.  
  1839.     See Also: color, borderColor, nameColor, hiliteColor
  1840.  
  1841.     -----------------------------------
  1842.     HILITE
  1843.  
  1844.     Purpose: Use the hilite property to determine or change the current
  1845.     hilite status of a field.
  1846.  
  1847.     This property can be true or false; the default is false. If the value
  1848.     of the hiliteIfFocus property is true, the field will be highlighted
  1849.     automatically when the user tabs to it. Thus, the hilite property would
  1850.     be true. The color of the highlight is determined by the hiliteColor.
  1851.  
  1852.     Examples:
  1853.  
  1854.     set the hilite of page field 1 to true;
  1855.  
  1856.     set the hilite of page field 1 to the hilite of page button 1;
  1857.  
  1858.     Sometimes it is useful to highlight a field automatically when the mouse
  1859.     is moved into its rectangle. These two handlers in the field's script
  1860.     will do this:
  1861.  
  1862.     handler mouseEnter;
  1863.     begin
  1864.       set the hilite of me to true;
  1865.     end;
  1866.  
  1867.     handler mouseLeave;
  1868.     begin
  1869.       set the hilite of me to false;
  1870.     end;
  1871.  
  1872.     See Also: hiliteIfFocus, autoHilite
  1873.  
  1874.  
  1875.  
  1876.     ________________________________________________________________________
  1877.                                              Chapter 12: Properties   180
  1878.     ________________________________________________________________________
  1879.  
  1880.  
  1881.     -----------------------------------
  1882.     HILITECOLOR
  1883.  
  1884.     Purpose: Use the hiliteColor property to determine or change the color
  1885.     of the field when it has the focus. This property will only affect
  1886.     fields with hiliteIfFocus set to true. If hiliteIfFocus is false, the
  1887.     field will not be highlighted when it receives the focus.
  1888.  
  1889.     The range of valid colors is from 0 to 255; the default is 112 (black on
  1890.     grey).
  1891.  
  1892.     This property can also be modified through the Field Info dialog box.
  1893.  
  1894.     Examples:
  1895.  
  1896.     set the hiliteColor of field "help msg" to yellow;
  1897.  
  1898.     set the hiliteColor of page field 1 to
  1899.       the hiliteColor of page field 1 of the next page;
  1900.  
  1901.     See Also: color, nameColor, fillColor, borderColor
  1902.  
  1903.     -----------------------------------
  1904.     HILITEIFFOCUS
  1905.  
  1906.     Purpose: Use the hiliteIfFocus property to determine or change whether a
  1907.     field is automatically highlighted when it has the focus.
  1908.  
  1909.     When hiliteIfFocus is true, the field is automatically highlighted when
  1910.     it gets the focus. The user is then required to use F2 to edit the
  1911.     field. If hiliteIfFocus is false (the default), when the field receives
  1912.     the focus, the cursor is immediately placed within the text ready for
  1913.     typing.
  1914.  
  1915.     This property can also be modified through the Field Info dialog box.
  1916.  
  1917.     Examples:
  1918.  
  1919.     set the hiliteIfFocus of page field 1 to true;
  1920.  
  1921.     set the hiliteIfFocus of field "Notes" to false;
  1922.  
  1923.     See Also: hilite, autoHilite
  1924.  
  1925.     -----------------------------------
  1926.     ID
  1927.  
  1928.     Purpose: Use this property to determine how the button is identified.
  1929.     Each button ID is unique for that page and cannot be altered.
  1930.  
  1931.     Using the button ID is the only way to guarantee that you are
  1932.     referencing a unique button.
  1933.  
  1934.  
  1935.  
  1936.     ________________________________________________________________________
  1937.                                              Chapter 12: Properties   181
  1938.     ________________________________________________________________________
  1939.  
  1940.  
  1941.     The returned value of ID is a number.
  1942.  
  1943.     You can see the field's ID number in the Field Info dialog box.
  1944.  
  1945.     Examples:
  1946.  
  1947.     put the id of page field 1 into fid;
  1948.  
  1949.     if the id of me > 20 then set the visible of me to true;
  1950.  
  1951.     The following statements in a field script pass the field ID to a
  1952.     handler in the page called setProps. In this way, the setProps handler
  1953.     can uniquely identify this field.
  1954.  
  1955.     handler openField;
  1956.     begin
  1957.       get the id of me;
  1958.       send "SetProps" it to me;
  1959.     end;
  1960.  
  1961.     handler setProps(fid);
  1962.     begin
  1963.       hide field id fid;
  1964.     end;
  1965.  
  1966.     See Also: ID, name, longName
  1967.  
  1968.     -----------------------------------
  1969.     INSERTPOINT
  1970.  
  1971.     Purpose: Use the insertPoint property to determine the position of the
  1972.     cursor within a text field. Each character in the field counts as a
  1973.     valid position for the text cursor, including carriage returns and
  1974.     spaces.
  1975.  
  1976.     The value of the insertPoint will be between 1 and the number of
  1977.     characters in the field:
  1978.  
  1979.     1 <= insertPoint <= the number of chars in the field
  1980.  
  1981.     Examples:
  1982.  
  1983.     set the insertPoint of field "Last Name" to 6;
  1984.  
  1985.     The following moves the insert point to the first occurrence of the word
  1986.     "that":
  1987.  
  1988.     set the insertPoint of page field "Comment" to
  1989.       offset("that",page field "Comment");
  1990.  
  1991.  
  1992.  
  1993.     ________________________________________________________________________
  1994.                                              Chapter 12: Properties   182
  1995.     ________________________________________________________________________
  1996.  
  1997.  
  1998.     -----------------------------------
  1999.     LAYER
  2000.  
  2001.     Purpose: Use the layer property to determine the layer of a field in
  2002.     relation to the other fields on the page or background.
  2003.     Fields are superimposed on their background or page according to their
  2004.     layer. The fields closest to the page are lower in value and are
  2005.     possibly overlapped by fields on a higher layer.
  2006.  
  2007.     Examples:
  2008.  
  2009.     put the layer of page field 1 into msg;
  2010.  
  2011.     The following example uses the field's layer to create an index into a
  2012.     container of values for that field. If the wrong value is entered into
  2013.     the field, an error is displayed.
  2014.  
  2015.     handler closeField;
  2016.     begin
  2017.       get the layer of me;
  2018.       if item it of "10,56,78,34" is not the value of me then
  2019.         answer "Field" && it && has the wrong value;
  2020.     end;
  2021.  
  2022.     See Also: ID
  2023.  
  2024.     -----------------------------------
  2025.     LOCATION
  2026.  
  2027.     Purpose: The location property determines the X (column) and Y (row)
  2028.     coordinates of the upper left corner of a field and returns two numbers
  2029.     in "X,Y" format; for example:
  2030.  
  2031.     "10,12"
  2032.  
  2033.     The location can be changed using the Selector tool, or by setting the
  2034.     rectangle property.
  2035.  
  2036.     Examples:
  2037.  
  2038.     put the location of page field 3 into page field 4;
  2039.  
  2040.     Abbreviations: loc
  2041.  
  2042.     See Also: rectangle
  2043.  
  2044.  
  2045.  
  2046.     ________________________________________________________________________
  2047.                                              Chapter 12: Properties   183
  2048.     ________________________________________________________________________
  2049.  
  2050.  
  2051.     -----------------------------------
  2052.     LOCKTEXT
  2053.  
  2054.     Purpose: Use the lockText property to prevent or allow editing within a
  2055.     field. When you create a field, lockText is initially false; this allows
  2056.     you to enter and edit the field.
  2057.  
  2058.     Locked text fields are completely inaccessible to the keyboard user. You
  2059.     can't enter text into them or edit them. A locked text field acts like a
  2060.     button when the mouse is clicked on it (the field receives mouseDown,
  2061.     mouseStillDown, and mouseUp).
  2062.  
  2063.     You can modify the lockText property using the Field Info dialog box.
  2064.  
  2065.     When to use it: When you want to protect the text in your fields from
  2066.     inadvertent editing, or you want a field to act like a button, set
  2067.     lockText to true. This is useful for creating fields that contain
  2068.     messages or visual information for the user.
  2069.  
  2070.     Examples:
  2071.  
  2072.     set the lockText of page field "Salaries" to true;
  2073.  
  2074.     The next example goes to a page that contains the word "hello" in
  2075.     background field 1. It is important to lock the field first to prevent
  2076.     HyperPAD from setting the focus to that field.
  2077.  
  2078.     set the lockText of field 1 to true;
  2079.     find "hello" in field 1;
  2080.     set the lockText of field 1 to false;
  2081.  
  2082.     -----------------------------------
  2083.     LONGID
  2084.  
  2085.     Purpose: The longID property returns the full field ID, including the
  2086.     field's ID number, the page or background name the field is on, and the
  2087.     full DOS path of the pad it's in.
  2088.  
  2089.     You can not alter a longID. The format of the longID for a page field
  2090.     is:
  2091.  
  2092.     field id 1 of page id 1 of pad "C:\HPAD2\HOME.PAD"
  2093.     or for a background field:
  2094.  
  2095.     bkgnd field id 1 of bkgnd page id 1 of pad "C:\HOME.PAD"
  2096.  
  2097.     Examples:
  2098.  
  2099.     put the longID of page field "phone";
  2100.  
  2101.     See Also: ID, name, longName
  2102.  
  2103.  
  2104.  
  2105.     ________________________________________________________________________
  2106.                                              Chapter 12: Properties   184
  2107.     ________________________________________________________________________
  2108.  
  2109.  
  2110.     -----------------------------------
  2111.     LONGNAME
  2112.  
  2113.     Purpose: The longName property returns the complete name of any field in
  2114.     a pad. The long name of a page field contains information such as the
  2115.     full DOS path and has the following format:
  2116.  
  2117.     field id 12 of page 45 of pad "C:\HPAD\HOME.PAD"
  2118.  
  2119.     For background fields, the word bkgnd is used:
  2120.  
  2121.     bkgnd field id 12 of bkgnd 3 of pad "C:\HPAD\HOME.PAD"
  2122.  
  2123.     You can't change the longName of a field.
  2124.  
  2125.     Examples:
  2126.  
  2127.     put the longName of field 1 into msg;
  2128.  
  2129.     The next example prints out the script of field 1 the
  2130.     longName of the field as the heading:
  2131.  
  2132.     print (the longName of field 1) & return & return;
  2133.     print (the script of field 1) & return & return;
  2134.  
  2135.     See Also: name, namePosition, nameColor, showName
  2136.  
  2137.     -----------------------------------
  2138.     MARKEDLINES
  2139.  
  2140.     Purpose: Use this property to get a list of the line numbers of the
  2141.     lines currently marked in a list box field. The value of markedLines is
  2142.     an item delimited list of line numbers, like the following:
  2143.  
  2144.     "10,11,12,18,19"
  2145.  
  2146.     The above example means that lines 10 though 12, 18 and 19 are all
  2147.     marked.
  2148.  
  2149.     If there aren't any marked lines in the field, then the value is empty.
  2150.  
  2151.     Examples:
  2152.  
  2153.     if the markedLines of field "list" is empty then
  2154.       answer "There are no marked lines!";
  2155.  
  2156.  
  2157.  
  2158.     ________________________________________________________________________
  2159.                                              Chapter 12: Properties   185
  2160.     ________________________________________________________________________
  2161.  
  2162.  
  2163.     The following example copies all of the marked lines from page field 1
  2164.     into page field 2:
  2165.  
  2166.     put the markedLines of page field 1 into mlist;
  2167.     put the number of items of mlist into n;
  2168.     for i = 1 to n do
  2169.       put line (item i of mlist) of page field 1
  2170.         after the last line of page field 2;
  2171.     end;
  2172.  
  2173.     Comments: You cannot set the markedLines property of a field. By
  2174.     adjusting the field's content, however, you can mark lines.
  2175.     HyperPAD marks lines by inserting the ASCII character 1 as the first
  2176.     character on a line. For example, to mark the first line of field 1:
  2177.  
  2178.     put numToChar(1) before char 1 of line 1 of field 1;
  2179.  
  2180.     When you retrieve the markedLines, HyperPAD returns an item delimited
  2181.     list of the line numbers containing character 1 as the first character.
  2182.     Whenever you change a field's content, all of the marks are removed from
  2183.     the text. Thus, the following two statements result in only one line
  2184.     (the second line) being marked:
  2185.  
  2186.     put numToChar(1) before char 1 of line 1 of field 1;
  2187.  
  2188.     put numToChar(1) before char 1 of line 2 of field 1;
  2189.  
  2190.     To avoid this, you must first copy the field into a local variable, mark
  2191.     the lines you want, then copy the local variable back into the field:
  2192.  
  2193.     put field 1 into temp;
  2194.     put numToChar(1) before char 1 of line 1 of temp;
  2195.     put numToChar(1) before char 1 of line 2 of temp;
  2196.     put temp into field 1;
  2197.  
  2198.     See Also: mark, unmark
  2199.  
  2200.  
  2201.  
  2202.     ________________________________________________________________________
  2203.                                              Chapter 12: Properties   186
  2204.     ________________________________________________________________________
  2205.  
  2206.  
  2207.     -----------------------------------
  2208.     NAME
  2209.  
  2210.     Purpose: Use the name property to determine the name of any
  2211.     field in the current pad. The returned value is the same as the name in
  2212.     the Field Info dialog box.
  2213.  
  2214.     Examples:
  2215.  
  2216.     set the name of page field 1 of page 2 to "Last Name";
  2217.  
  2218.     if the name of page field i is "Last Name" then
  2219.       print page field i;
  2220.  
  2221.     put the name of page field 2 into fname;
  2222.     put the id of page field fname into msg;
  2223.  
  2224.     See Also: namePosition, longName, nameColor, showName, ID,
  2225.     longID.
  2226.  
  2227.     -----------------------------------
  2228.     NAMECOLOR
  2229.  
  2230.     Purpose: The nameColor property modifies the color of the displayed name
  2231.     of a field.
  2232.  
  2233.     When showName is true, the name appears either to the left or on top of
  2234.     the field using the attribute determined by nameColor.
  2235.  
  2236.     The colors you select must be in the range from 0 to 255 (or use the
  2237.     color constants). Changing this property modifies the Name Color option
  2238.     in the Field Info dialog box.
  2239.  
  2240.     Examples:
  2241.  
  2242.     set the nameColor of page field 1 to white on green;
  2243.  
  2244.     set the nameColor of field "Last Name" to 31;
  2245.  
  2246.     set the nameColor of field 2 to the fillColor of field 2;
  2247.  
  2248.     See Also: showName, namePosition
  2249.  
  2250.  
  2251.  
  2252.     ________________________________________________________________________
  2253.                                              Chapter 12: Properties   187
  2254.     ________________________________________________________________________
  2255.  
  2256.  
  2257.     -----------------------------------
  2258.     NAMEPOSITION
  2259.  
  2260.     Purpose: Use the namePosition property to determine the
  2261.     location of the field's name, which can be either on top or to the left
  2262.     of the field. In order for this property to have an effect, the name
  2263.     must be shown (the showName property must be
  2264.     true).
  2265.  
  2266.     When namePosition is left (the default), the name of the field appears
  2267.     on the left side of the field, decreasing the field's editing area by
  2268.     the width of the name. When set to top, the name appears on top of the
  2269.     field, decreasing the editing area by 1 line.
  2270.  
  2271.     A colon always follows the displayed field name.
  2272.  
  2273.     Changing this property changes the Name position option in the Field
  2274.     Info dialog box.
  2275.  
  2276.     Examples:
  2277.  
  2278.     set the namePosition of page field 1 to left;
  2279.  
  2280.     set the namePosition of field "Last Name" to top;
  2281.  
  2282.     Abbreviations: namePos
  2283.  
  2284.     See Also: showName, nameColor
  2285.  
  2286.     -----------------------------------
  2287.     RECTANGLE
  2288.  
  2289.     Purpose: The rectangle property determines the position of
  2290.     the rectangular region occupied by a field. The value of rectangle is a
  2291.     text string consisting of four numbers separated by commas, and may be
  2292.     summarized:
  2293.  
  2294.     upper left x, upper left y, lower right x, lower right y
  2295.  
  2296.     You can also change a field's rectangle property using the Selector
  2297.     tool. (See the User's Guide for more information on the Selector tool.)
  2298.  
  2299.     To set a field's rectangle, you must supply all four numbers, separated
  2300.     by commas (not a container having a text string of numbers). For
  2301.     example, the following statements will not work because the variable "r"
  2302.     contains a string of numbers:
  2303.  
  2304.     put the rectangle of page field 1 into r;
  2305.     set the rectangle of page field 1 to r;
  2306.  
  2307.  
  2308.  
  2309.     ________________________________________________________________________
  2310.                                              Chapter 12: Properties   188
  2311.     ________________________________________________________________________
  2312.  
  2313.  
  2314.  ┌───────────────────────────────────────────────────────────────────────┐
  2315.  │                                                                       │
  2316.  │ **** The Printed Documentation has a picture or screen shot here **** │
  2317.  │                                                                       │
  2318.  └───────────────────────────────────────────────────────────────────────┘
  2319.     
  2320.  
  2321.     The following will work:
  2322.  
  2323.     put the rectangle of page field 1 into r;
  2324.     set the rectangle of page field 1 to
  2325.       item 1 of r, item 2 of r, item 3 of r, item 4 of r;
  2326.  
  2327.     The default rectangle for a field is 29,9,55,15.
  2328.  
  2329.     Examples:
  2330.  
  2331.     set the rectangle of page field 1 to 10,10,70,20;
  2332.  
  2333.     Abbreviations: rect
  2334.  
  2335.     See Also: location
  2336.  
  2337.     -----------------------------------
  2338.     SCRIPT
  2339.  
  2340.     Purpose: The script property allows you to retrieve or
  2341.     replace the script of any field in a pad. Setting this property replaces
  2342.     the script of a field with a new one. The new script must be compiled
  2343.     and checked for errors. Any handlers within the script that contain
  2344.     errors will not be compiled.
  2345.  
  2346.     The value of script is a text string composed of lines separated by
  2347.     carriage returns.
  2348.  
  2349.     The script can also be changed through the Field Info dialog box.
  2350.  
  2351.     When to use it: When you want to copy a script from one field to
  2352.     another, or assign a new script to a field, or print a script.
  2353.  
  2354.     Examples:
  2355.  
  2356.     To display the script of field 1:
  2357.  
  2358.     put the script of page field 1 into page field 1;
  2359.  
  2360.  
  2361.  
  2362.     ________________________________________________________________________
  2363.                                              Chapter 12: Properties   189
  2364.     ________________________________________________________________________
  2365.  
  2366.  
  2367.     To change a script:
  2368.  
  2369.     set the script of field "Last Name" to stext;
  2370.  
  2371.     To recompile a script of field:
  2372.  
  2373.     set the script of pg fld 1 to the script of pg fld 1;
  2374.  
  2375.     To print the script of field "First Name":
  2376.  
  2377.     print the script of field "First Name";
  2378.  
  2379.     -----------------------------------
  2380.     SCROLLABLE
  2381.  
  2382.     Purpose: The scrollable property determines if you can view
  2383.     text outside the physical confines of a field. With HyperPAD, you can
  2384.     place more text into a field than can be viewed at once. With a
  2385.     scrollable field, you can allow the user to move down through the field
  2386.     to view the text that doesn't fit inside the field.
  2387.  
  2388.     The default is true.
  2389.  
  2390.     Changing the property changes the Scrollable option in the Field Info
  2391.     dialog box.
  2392.  
  2393.     When to use it: To include more information in a field without
  2394.     increasing its size, set scrollable to true.
  2395.  
  2396.     Examples:
  2397.  
  2398.     set the scrollable of page field 1 to true;
  2399.  
  2400.     set the scrollable of field "Last Name" to false;
  2401.  
  2402.     The following handler (in a pad or background script) sets the
  2403.     scrollable property to false for all new fields:
  2404.  
  2405.     handler newField;
  2406.     begin
  2407.       set the scrollable of the target to false;
  2408.     end;
  2409.  
  2410.  
  2411.  
  2412.     ________________________________________________________________________
  2413.                                              Chapter 12: Properties   190
  2414.     ________________________________________________________________________
  2415.  
  2416.  
  2417.     -----------------------------------
  2418.     SHOWNAME
  2419.  
  2420.     Purpose: The showName property determines whether the
  2421.     field's name is shown. When true, the name of the field is displayed
  2422.     either to the left or top of the field, depending on the value of
  2423.     namePosition. By default showName is false, meaning that the field's
  2424.     name isn't shown.
  2425.  
  2426.     This property can be modified using the Field Info dialog box.
  2427.  
  2428.     Examples:
  2429.  
  2430.     set the showName of page field 1 to true;
  2431.  
  2432.     set the showName of the target to false;
  2433.  
  2434.     The following handler creates a dBase style field. It sets all of the
  2435.     relevant properties, including showName, and receives the name as a
  2436.     parameter.
  2437.  
  2438.     handler DBASEField(fieldName);
  2439.     begin
  2440.       set the showName of field fieldName to true;
  2441.       set the withEdge of field fieldName to false;
  2442.       set the hiliteIfFocus of field fieldName to true;
  2443.       set the scrollable of field fieldName to false;
  2444.       set the lockText of field fieldName to false;
  2445.       set the style of field fieldName to opaque;
  2446.       set the align of field fieldName to left;
  2447.       set the namePosition of field fieldName to left;
  2448.     end;
  2449.     To call this handler:
  2450.  
  2451.     DBASEField "Last Name";
  2452.  
  2453.     See Also: showName, namePosition, nameColor, name, longName
  2454.  
  2455.     -----------------------------------
  2456.     STARTLINE
  2457.  
  2458.     Purpose: The startLine property allows you to determine which is the
  2459.     first line displayed in a scrollable field. The value of startLine is
  2460.     not determined by carriage returns, but by the actual lines of text in
  2461.     the field.
  2462.  
  2463.     When to use it: By changing the value of startLine, you can simulate
  2464.     scrolling through a field. (Note: the field must be scrollable.).
  2465.  
  2466.     Examples:
  2467.  
  2468.     set the startLine of page field 1 to 1;
  2469.  
  2470.  
  2471.  
  2472.     ________________________________________________________________________
  2473.                                              Chapter 12: Properties   191
  2474.     ________________________________________________________________________
  2475.  
  2476.  
  2477.     To synchronize two fields so that they both start at the same line:
  2478.  
  2479.     set the startLine of page field 1 to
  2480.       the startLine of page field 2;
  2481.  
  2482.     The following example scrolls all the fields on a page down by one line:
  2483.  
  2484.     for i = 1 to the number of page fields do
  2485.     begin
  2486.       set the startLine of page field i to
  2487.       (the startLine of page field i) +1;
  2488.     end;
  2489.  
  2490.     -----------------------------------
  2491.     STYLE
  2492.  
  2493.     Purpose: Use the style property to determine or change the style of a
  2494.     particular field. There are four different styles for fields.
  2495.     Each style changes the way a field looks and works.
  2496.  
  2497.     The fields styles are:
  2498.     opaque    transparent    scrolling    listBox
  2499.  
  2500.     List box fields require some special mention because they receive some
  2501.     additional messages that other style fields do not receive. The
  2502.     differences are summarized as follows:
  2503.  
  2504.     1.  Lines in list box fields do not word wrap; all lines are broken only
  2505.     by carriage returns.
  2506.  
  2507.     2.  The UP and DOWN arrow keys move a highlight bar through the choices
  2508.     in the field.
  2509.  
  2510.     3.  Pressing SPACE marks and unmarks the highlighted line. This actions
  2511.     sends the mark and unmark messages to the field.
  2512.  
  2513.     4.  Pressing ENTER or double clicking the mouse on a choice sends a
  2514.     select message to the field.
  2515.  
  2516.     5.  You can get the currently marked line numbers using the markedLines
  2517.     property.
  2518.  
  2519.     You can also change a field's style using the Field Info dialog box.
  2520.  
  2521.     Examples:
  2522.  
  2523.     set the style of page field 1 to listBox;
  2524.  
  2525.     if the style of field "Last Name" is scrolling then
  2526.       set the style of field "Last Name" to opaque;
  2527.  
  2528.  
  2529.  
  2530.     ________________________________________________________________________
  2531.                                              Chapter 12: Properties   192
  2532.     ________________________________________________________________________
  2533.  
  2534.  
  2535.     The following function returns the contents of all the list box fields
  2536.     on a page:
  2537.  
  2538.     function getListBoxes;
  2539.     begin
  2540.       get empty;
  2541.       for i = 1 to the number of page fields do
  2542.         begin
  2543.           if the style of page field i is listBox then
  2544.             put it after the last line of it;
  2545.         end;
  2546.       return it;
  2547.     end;
  2548.  
  2549.     -----------------------------------
  2550.     VALUE
  2551.  
  2552.     Purpose: The value property determines the content of a field.
  2553.  
  2554.     Example:
  2555.     The following handler copies a field's content into the message box when
  2556.     it receives the focus:
  2557.  
  2558.     handler openField;
  2559.     begin
  2560.       put the value of me into the msg box;
  2561.     end;
  2562.  
  2563.     -----------------------------------
  2564.     VISIBLE
  2565.  
  2566.     Purpose: The visible property determines whether a field is visible or
  2567.     hidden. When a field is hidden, it cannot be edited or given the focus.
  2568.     Further, hidden fields cannot be edited using the Selector tool unless
  2569.     the visible property is set to true.
  2570.  
  2571.     When a field is created, the visible is true (the default).
  2572.  
  2573.     This property can also be changed using the hide and show commands. You
  2574.     are unable to modify this property using the Field Info dialog box (you
  2575.     must use the message box or a script).
  2576.  
  2577.     When to use it: If you have information in a field that you want the
  2578.     user to view only after a specific action is taken (such as selecting a
  2579.     button) you can use visible to hide and then show the field.
  2580.  
  2581.  
  2582.  
  2583.     ________________________________________________________________________
  2584.                                              Chapter 12: Properties   193
  2585.     ________________________________________________________________________
  2586.  
  2587.  
  2588.     Examples:
  2589.  
  2590.     set the visible of page field "Notes" to false;
  2591.  
  2592.     set the visible of page field "help" to the check   of button id 2;
  2593.  
  2594.     put the visible of field id 4;
  2595.  
  2596.     show page field 1;  -- sets visible to true
  2597.     hide page field 1;  -- sets visible to false
  2598.  
  2599.     The following button handler displays a help field when selected:
  2600.  
  2601.     handler select;
  2602.     begin
  2603.       show page field "help";
  2604.       wait 10000;              -- wait 10 seconds
  2605.       hide page field "help";
  2606.     end;
  2607.  
  2608.     -----------------------------------
  2609.     WITHEDGE
  2610.  
  2611.     Purpose: Use the withEdge property to determine whether a field has a
  2612.     border. When true (the default), the field is displayed with the
  2613.     edgeType as the border.
  2614.  
  2615.     You can modify this property using the Field Info dialog box.
  2616.  
  2617.     Examples:
  2618.  
  2619.     set the withEdge of page field 1 to true;
  2620.  
  2621.     put the withEdge of field "Last Name" into the message box.
  2622.  
  2623.     See Also: edgeType, borderColor
  2624.  
  2625.  
  2626.  
  2627.     ________________________________________________________________________
  2628.                                              Chapter 12: Properties   194
  2629.     ________________________________________________________________________
  2630.  
  2631.  
  2632.     BUTTON PROPERTIES
  2633.  
  2634.     The following section describes the properties that are used by buttons.
  2635.     Some of the properties used by buttons are also used by fields.
  2636.  
  2637.  ┌───────────────────────────────────────────────────────────────────────┐
  2638.  │                                                                       │
  2639.  │ **** The Printed Documentation has a picture or screen shot here **** │
  2640.  │                                                                       │
  2641.  └───────────────────────────────────────────────────────────────────────┘
  2642.     
  2643.  
  2644.     -----------------------------------
  2645.     ACCELERATORCOLOR
  2646.  
  2647.     Purpose: The acceleratorColor property determines the color of the
  2648.     selected acceleratorKey (a selected character in the button's name) when
  2649.     the user presses ALT in Browse mode. Any button in your pad can be
  2650.     assigned an accelerator key, which allows for quick selection of the
  2651.     button. An acceleratorKey must be selected and showName must be true for
  2652.     acceleratorColor to have an effect.
  2653.  
  2654.     The range of values is from 0 to 255; The default is 7 (grey on black).
  2655.  
  2656.     You can modify the acceleratorColor using the Button Info dialog box.
  2657.  
  2658.     Examples:
  2659.  
  2660.     set the acceleratorColor of page button 3 to red on blue;
  2661.  
  2662.     Abbreviations: accelColor
  2663.  
  2664.     See Also: acceleratorKey, showName
  2665.  
  2666.  
  2667.  
  2668.     ________________________________________________________________________
  2669.                                              Chapter 12: Properties   195
  2670.     ________________________________________________________________________
  2671.  
  2672.  
  2673.     -----------------------------------
  2674.     ACCELERATORKEY
  2675.  
  2676.     Purpose: The acceleratorKey property defines the character in the
  2677.     button's name that the user can press to speed button selection.
  2678.     This property allows users to select buttons by holding down ALT and a
  2679.     specified character in the button's name.
  2680.  
  2681.     The acceleratorColor must be different from the fillColor and showName
  2682.     must be true for this property to work.
  2683.  
  2684.     When you press the accelerator key combination for a button, the button
  2685.     becomes highlighted and a select message is sent to that button.
  2686.     Any letter or number (A..Z,0..9) can be used an accelerator key. The
  2687.     default is empty.
  2688.  
  2689.     If the accelerator letter isn't within the button's name, then you will
  2690.     not see it when you press ALT. However, you can still press the ALT key
  2691.     combination to select that button.
  2692.  
  2693.     Examples:
  2694.  
  2695.     set the accelKey of page button 1 to "A";
  2696.  
  2697.     set the acceleratorKey of button "Home" to "H";
  2698.  
  2699.     Comments: Make sure you select a unique key code for the accelerator
  2700.     key. If you don't, then the button with the lowest layer gets the focus
  2701.     first. Also, be careful because button accelerator keys have priority
  2702.     over menu accelerators (such as ALT+F for File menu).
  2703.  
  2704.     Abbreviations: accelKey
  2705.  
  2706.     See Also:  acceleratorColor, showName, select
  2707.  
  2708.     -----------------------------------
  2709.     ALIGN
  2710.  
  2711.     Purpose: This property controls the positioning of the button's name
  2712.     within the button. The possible values are:
  2713.  
  2714.     left
  2715.     right
  2716.     centered
  2717.     The default is centered.
  2718.  
  2719.     Examples:
  2720.  
  2721.     set the align of page button 4 to right;
  2722.  
  2723.  
  2724.  
  2725.     ________________________________________________________________________
  2726.                                              Chapter 12: Properties   196
  2727.     ________________________________________________________________________
  2728.  
  2729.  
  2730.     -----------------------------------
  2731.     AUTOHILITE
  2732.  
  2733.     Purpose: The autoHilite property determines if a button is automatically
  2734.     highlighted when it receives the focus. The color of the highlighted
  2735.     button is determined by the value of hiliteColor.
  2736.  
  2737.     The default value of autoHilite is true.
  2738.     Buttons that have the focus will be highlighted only if hiliteIfFocus is
  2739.     true. If hiliteIfFocus is false, then the button will only be
  2740.     highlighted while the mouse is pressed and the mouse pointer is within
  2741.     the rectangle of that button.
  2742.  
  2743.     When a button is highlighted, the hilite property for that button is set
  2744.     to true.
  2745.  
  2746.     Examples:
  2747.  
  2748.     set the autoHilite of button 1 to true;
  2749.  
  2750.     set the autoHilite of button "Home" to false;
  2751.  
  2752.     To make sure a button gets highlighted when it has the focus:
  2753.  
  2754.     set the autoHilite of button 1 to true;
  2755.     set the hiliteIfFocus of button 1 to true;
  2756.  
  2757.     See Also: hiliteIfFocus, hiliteColor, hilite
  2758.  
  2759.     -----------------------------------
  2760.     BORDERCOLOR
  2761.  
  2762.     Purpose: Use the borderColor property to determine the color of the
  2763.     characters that form the button's border. The borderColor property will
  2764.     have no effect unless withEdge is true and the style is not transparent.
  2765.  
  2766.     The range of colors is from 0 to 255; the default is 7 (grey on black).
  2767.  
  2768.     You can modify this property using the Button Info dialog box.
  2769.  
  2770.     Examples:
  2771.  
  2772.     set the borderColor of page button 1 to 7;
  2773.  
  2774.     if the style of button "Notes" is not transparent then
  2775.       set the borderColor of button 1 to yellow on red;
  2776.  
  2777.     See Also: withEdge, acceleratorColor, fillColor, color, hiliteColor
  2778.  
  2779.  
  2780.  
  2781.     ________________________________________________________________________
  2782.                                              Chapter 12: Properties   197
  2783.     ________________________________________________________________________
  2784.  
  2785.  
  2786.     -----------------------------------
  2787.     CHECK
  2788.  
  2789.     Purpose: The check property determines whether a button is checked. This
  2790.     will only have an effect on checkBox styled buttons.
  2791.  
  2792.     If the check is true, then the check box button will have an X between
  2793.     the brackets:
  2794.  
  2795.     [X] Include Last Name
  2796.  
  2797.     If it false, then there will be a blank space between the brackets:
  2798.  
  2799.     [ ] Include Last Name
  2800.  
  2801.     The value of check gets modified when HyperPAD receives the select
  2802.     message initially sent to a check box styled button. For example, the
  2803.     following script in your checkBox button prevents its value (the check)
  2804.     from being toggled, because it prevents the select message from being
  2805.     sent to HyperPAD.
  2806.  
  2807.     handler select;
  2808.     begin
  2809.     end;
  2810.  
  2811.     Intercepting the select message enables you to create option button
  2812.     groups in your pads (an option button group is where one button in the
  2813.     group is checked while the other are not). Suppose you have 3 buttons,
  2814.     of which only one can be checked at a time. The button names are "Blue",
  2815.     "Red", and "Green". The script of button "Green" would be:
  2816.  
  2817.     handler select;
  2818.     begin
  2819.       set the check of button "Red" to false;
  2820.       set the check of button "Blue" to false;
  2821.       set the check of me to true;
  2822.     end;
  2823.  
  2824.     The script of button "Red" would be:
  2825.  
  2826.     handler select;
  2827.     begin
  2828.       set the check of button "Blue" to false;
  2829.       set the check of button "Green" to false;
  2830.       set the check of me to true;
  2831.     end;
  2832.  
  2833.  
  2834.  
  2835.     ________________________________________________________________________
  2836.                                              Chapter 12: Properties   198
  2837.     ________________________________________________________________________
  2838.  
  2839.  
  2840.     and the script of button "Blue" would be:
  2841.  
  2842.     handler select;
  2843.     begin
  2844.       set the check of button "Green" to false;
  2845.       set the check of button "Red" to false;
  2846.       set the check of me to true;
  2847.     end;
  2848.  
  2849.     Examples:
  2850.  
  2851.     set the check of page button 1 to true;
  2852.  
  2853.     set the check of me to false;
  2854.  
  2855.     set the check of the target to the salesTax > 10;
  2856.  
  2857.     The following handler in the script of a check box button locks and
  2858.     unlocks a field depending on whether the button is checked.
  2859.  
  2860.     handler select;
  2861.     begin
  2862.       get the check of me;
  2863.       set the lockText of page field "Custom Size" to it;
  2864.       pass;
  2865.     end;
  2866.  
  2867.     Comments: You can still modify the checkBox property for buttons that do
  2868.     not have a checkBox style (you just won't see the X).
  2869.  
  2870.     -----------------------------------
  2871.     COLOR
  2872.  
  2873.     Purpose: Use the color property to modify the
  2874.     fillColor and the borderColor of a button.
  2875.  
  2876.     Setting the color of a button sets both the fillColor and the
  2877.     borderColor of the button. Getting the color of a button, however,
  2878.     returns only the fillColor of the button.
  2879.  
  2880.     Examples:
  2881.  
  2882.     set the color of page button 1 to 31;
  2883.  
  2884.     set the color of button "Home" to white on red
  2885.  
  2886.     See Also: fillColor, borderColor, hiliteColor, acceleratorColor
  2887.  
  2888.  
  2889.  
  2890.     ________________________________________________________________________
  2891.                                              Chapter 12: Properties   199
  2892.     ________________________________________________________________________
  2893.  
  2894.  
  2895.     -----------------------------------
  2896.     EDGETYPE
  2897.  
  2898.     Purpose: Use the edgeType property to determine the type of border a
  2899.     button uses.
  2900.  
  2901.     The valid edge types are 1 to 15. The default is 1, which is a single
  2902.     width line. This property will only have an effect if the value of
  2903.     withEdge is true.
  2904.  
  2905.     Appendix 3 shows the available edge types and their corresponding
  2906.     values.
  2907.  
  2908.     Examples:
  2909.  
  2910.     put the edgeType of button 4 into the message box;
  2911.  
  2912.     The next two handlers in a button script change the border to a double
  2913.     line when the button has the focus, and sets the border back to a single
  2914.     width line when the focus changes to another object.
  2915.  
  2916.     handler openButton;
  2917.     begin
  2918.       set the edgeType of me to 2;
  2919.     end;
  2920.  
  2921.     handler closeButton;
  2922.     begin
  2923.       set the edgeType of me to 1;
  2924.     end;
  2925.  
  2926.     See Also: withEdge, borderColor
  2927.  
  2928.     -----------------------------------
  2929.     FILLCOLOR
  2930.  
  2931.     Purpose: The fillColor property determines the color of the interior
  2932.     portion of a button, including the button name.
  2933.  
  2934.     You color will have no effect if the button style is transparent.
  2935.  
  2936.     The valid range of colors is from 0 to 255; the default is 7 (grey on
  2937.     black).
  2938.  
  2939.     Examples:
  2940.  
  2941.     set the fillColor of button 1 to red;
  2942.  
  2943.     set the fillColor of button 2 to the borderColor of button 2;
  2944.  
  2945.     See Also: acceleratorColor, borderColor, color, hiliteColor
  2946.  
  2947.  
  2948.  
  2949.     ________________________________________________________________________
  2950.                                              Chapter 12: Properties   200
  2951.     ________________________________________________________________________
  2952.  
  2953.  
  2954.     -----------------------------------
  2955.     HILITE
  2956.  
  2957.     Purpose: Use the hilite property to determine whether a button is
  2958.     highlighted. When true, the button appears using the current color value
  2959.     of the hiliteColor property.
  2960.  
  2961.     Buttons that have the focus will only be highlighted if the autoHilite
  2962.     property is true. If false, then the button will only be highlighted
  2963.     when a mouse button is pressed while the mouse pointer is within the
  2964.     rectangle of the button.
  2965.  
  2966.     Examples:
  2967.  
  2968.     set the hilite of page button "Quit" to true;
  2969.  
  2970.     if the hilite of page button "Home" is true then
  2971.       answer "You are highlighting Home";
  2972.  
  2973.     See Also: autoHilite, hiliteColor
  2974.  
  2975.     -----------------------------------
  2976.     HILITECOLOR
  2977.  
  2978.     Purpose: The hiliteColor property determines the color of a button when
  2979.     it has the focus. The autoHilite property has to be true for the button
  2980.     to be able to be highlighted.
  2981.  
  2982.     A button can be highlighted (using the hiliteColor) under the following
  2983.     two conditions:
  2984.  
  2985.     1.  If the button has the focus and hiliteIfFocus is set to true.
  2986.  
  2987.     2.  While the mouse button is held down and the pointer is inside the
  2988.     button's rectangle.
  2989.  
  2990.     The range of valid colors is from 0 to 255; the default is 112 (black on
  2991.     grey).
  2992.  
  2993.     You can modify this property using the Button Info dialog box.
  2994.  
  2995.     Examples:
  2996.  
  2997.     set the hiliteColor of button "hello" to yellow;
  2998.  
  2999.     set the hiliteColor of page button 1 to
  3000.       the hiliteColor of page button 2;
  3001.  
  3002.  
  3003.  
  3004.     ________________________________________________________________________
  3005.                                              Chapter 12: Properties   201
  3006.     ________________________________________________________________________
  3007.  
  3008.  
  3009.     -----------------------------------
  3010.     HILITEIFFOCUS
  3011.  
  3012.     Purpose: Use the hiliteIfFocus property to determine whether your button
  3013.     is highlighted when it has the focus.
  3014.  
  3015.     When true, a button with the focus will be highlighted using the
  3016.     hiliteColor. If false, the button will not be highlighted when it has
  3017.     the focus.
  3018.  
  3019.     You can modify this property using the Button Info dialog box.
  3020.  
  3021.     Examples:
  3022.  
  3023.     set the hiliteIfFocus of page button 1 to true;
  3024.  
  3025.     -----------------------------------
  3026.     ID
  3027.  
  3028.     Purpose: Use the ID property to determine the unique number that
  3029.     HyperPAD assigned to this button when it was created. The only way to
  3030.     uniquely reference a specific button is with the ID.
  3031.  
  3032.     You can't change a button's ID.
  3033.  
  3034.     You can see a button's ID using the Button Info dialog box.
  3035.  
  3036.     Examples:
  3037.  
  3038.     put the id of page button 1 into fid;
  3039.  
  3040.     if the id of me > 20 then set the visible of me to true;
  3041.  
  3042.     See Also: longID
  3043.  
  3044.     -----------------------------------
  3045.     LAYER
  3046.  
  3047.     Purpose: The layer property returns the layer number of the button with
  3048.     respect to all the buttons on the page.
  3049.  
  3050.     You cannot change this property through a script. You must use the
  3051.     Selector tool to select a button, then use the Send Farther and Move
  3052.     Closer commands on the Object menu.
  3053.  
  3054.     When to use it: It is sometimes convenient to organize your button's
  3055.     layering so that the layer of a button can be used as an index into
  3056.     data.
  3057.  
  3058.  
  3059.  
  3060.     ________________________________________________________________________
  3061.                                              Chapter 12: Properties   202
  3062.     ________________________________________________________________________
  3063.  
  3064.  
  3065.     Examples:
  3066.  
  3067.     put the layer of button 1 into page field 2;
  3068.  
  3069.     handler select;
  3070.     begin
  3071.       -- get the line number corresponding to the layer
  3072.       get line (the layer of me) of page field "index";
  3073.       go to page it;
  3074.     end;
  3075.  
  3076.     -----------------------------------
  3077.     LOCATION
  3078.  
  3079.     Purpose: The location property determines the X (column) and Y (row)
  3080.     coordinates from the upper left corner of a button, returning two
  3081.     numbers in the "X,Y" format, like:
  3082.  
  3083.     10,12
  3084.  
  3085.     You can also change a button's location using the Selector tool, or by
  3086.     modifying the value of the rectangle property.
  3087.  
  3088.     Examples:
  3089.  
  3090.     set the location of page button 1 to 10,10;
  3091.     if the location of button "Home" is "3,4"
  3092.       then go to the next page
  3093.  
  3094.     Abbreviations: loc
  3095.  
  3096.     See Also: rectangle
  3097.  
  3098.     -----------------------------------
  3099.     LOCKTEXT
  3100.  
  3101.     Purpose: The lockText property locks a button so that it cannot be
  3102.     selected with the mouse or keyboard. Locked buttons receive no messages.
  3103.  
  3104.     When to use it: You can use a transparent button with the lockText
  3105.     property set to true to cover up other objects that you don't want
  3106.     selected.
  3107.  
  3108.     You can't modify this property using the Button Info dialog box. You
  3109.     must use either the message box or a script.
  3110.  
  3111.     Examples:
  3112.  
  3113.     set the lockText of button 1 to true;
  3114.  
  3115.     if the lockText of page button "Cover Up" then
  3116.       answer "Can't select that right now";
  3117.  
  3118.  
  3119.  
  3120.     ________________________________________________________________________
  3121.                                              Chapter 12: Properties   203
  3122.     ________________________________________________________________________
  3123.  
  3124.  
  3125.     -----------------------------------
  3126.     LONGID
  3127.  
  3128.     Purpose: Use longID to get a button's full identification information
  3129.     including its ID number, the name of the page or background the button
  3130.     is on, and the full DOS path of the pad it's in.
  3131.  
  3132.     The name is returned information is in the following format:
  3133.  
  3134.     button id 4 of page 4 of pad "C:\HPAD\HOME.PAD"
  3135.  
  3136.     You cannot change the longID of a button.
  3137.  
  3138.     Examples:
  3139.  
  3140.     put the longID of page button "exit" into the msg;
  3141.  
  3142.     if word 5 of the longID of the target is "page" then
  3143.       answer "This is a page button";
  3144.  
  3145.     See Also: ID, name, longName, layer
  3146.  
  3147.     -----------------------------------
  3148.     LONGNAME
  3149.  
  3150.     Purpose: The longName property allows you to access the long name of any
  3151.     button in a pad. The long name of a page button has the following
  3152.     format:
  3153.  
  3154.     button id 12 of page 45 of pad "C:\HPAD\HOME.PAD"
  3155.  
  3156.     For background buttons, the word bkgnd is used:
  3157.  
  3158.     bkgnd button id 12 of bkgnd 3 of pad "C:\HPAD\HOME.PAD"
  3159.  
  3160.     You cannot alter the longName of a button.
  3161.  
  3162.     Examples:
  3163.  
  3164.     put the longName of button 1 into msg;
  3165.  
  3166.     The next example prints out the script of button 1 with a heading
  3167.     containing its longName:
  3168.  
  3169.     print (the longName of button 1) & return & return;
  3170.     print (the script of button 1) & return & return;
  3171.  
  3172.     See Also: name, ID, longID, layer
  3173.  
  3174.  
  3175.  
  3176.     ________________________________________________________________________
  3177.                                              Chapter 12: Properties   204
  3178.     ________________________________________________________________________
  3179.  
  3180.  
  3181.     -----------------------------------
  3182.     NAME
  3183.  
  3184.     Purpose: Use the name property to determine the name of any button in
  3185.     the current pad.
  3186.  
  3187.     The value of the name property is the same as the name in the Button
  3188.     Info dialog box. The button's name can be referred to in a script or in
  3189.     the message box.
  3190.  
  3191.     You can modify this property using the Button Info dialog box.
  3192.  
  3193.     When to use it: By naming objects, you give yourself an easy to remember
  3194.     reference for each object in HyperPAD scripts.
  3195.  
  3196.     Examples:
  3197.  
  3198.     set the name of page button 1 of page 2 to "Last Name";
  3199.     These statements use the name property to refer to the object:
  3200.  
  3201.     get the name of the target;
  3202.     set the color of button it to red;
  3203.     set the align of button it to left;
  3204.  
  3205.     Comments: The button name cannot begin or end with a space character
  3206.     (use character 255 if you need to create space to the left of a button
  3207.     name).
  3208.  
  3209.     See Also: longName, align
  3210.  
  3211.     -----------------------------------
  3212.     RECTANGLE
  3213.  
  3214.     Purpose: The rectangle property determines the rectangular region
  3215.     occupied by a button. The value of rectangle is a text string of four
  3216.     numbers separated by commas, as in the following:
  3217.  
  3218.     upper left x, upper left y, lower right x, lower right y
  3219.     For example:
  3220.  
  3221.     "10,10,70,21"
  3222.  
  3223.     To set the rectangle of a button, you must supply all four numbers,
  3224.     separated by commas, not a text string of numbers. For example, the
  3225.     following statement will NOT work because the variable "r" contains a
  3226.     string of four numbers:
  3227.  
  3228.     put the rectangle of page button 1 into r;
  3229.     set the rectangle of page button 4 to r;
  3230.  
  3231.  
  3232.  
  3233.     ________________________________________________________________________
  3234.                                              Chapter 12: Properties   205
  3235.     ________________________________________________________________________
  3236.  
  3237.  
  3238.     The following will work:
  3239.  
  3240.     put the rectangle of page button 1 into r;
  3241.     set the rectangle of page button 6 to
  3242.       item 1 or r, item 2 of r, item 3 of r, item 4 of r;
  3243.  
  3244.     You can also set the rectangle of a button using the Selector tool.
  3245.  
  3246.  ┌───────────────────────────────────────────────────────────────────────┐
  3247.  │                                                                       │
  3248.  │ **** The Printed Documentation has a picture or screen shot here **** │
  3249.  │                                                                       │
  3250.  └───────────────────────────────────────────────────────────────────────┘
  3251.     
  3252.  
  3253.     Examples:
  3254.  
  3255.     set the rectangle of page button 1 to 10,10,70,20;
  3256.  
  3257.     set the rect of page button "Home" to 10,10,20,20;
  3258.     if item 3 of the rect of button 1 > 10 then
  3259.       go to the next page;
  3260.  
  3261.     Abbreviations: rect
  3262.  
  3263.     See Also: loc
  3264.  
  3265.  
  3266.  
  3267.     ________________________________________________________________________
  3268.                                              Chapter 12: Properties   206
  3269.     ________________________________________________________________________
  3270.  
  3271.  
  3272.     -----------------------------------
  3273.     SCRIPT
  3274.  
  3275.     Purpose: The script property retrieves or replaces the
  3276.     script of any button in a pad. The value of script is a text string
  3277.     composed of lines separated by carriage returns.
  3278.     Setting this property replaces the script of a button with a new one.
  3279.     The new script must be compiled and checked for errors. Any handlers
  3280.     within the script that contain errors will not be compiled.
  3281.  
  3282.     You can also view and modify the script through the Button Info dialog
  3283.     box, by selecting the Script button.
  3284.  
  3285.     Examples:
  3286.  
  3287.     put the script of page button 1 into page field 1;
  3288.  
  3289.     set the script of button "Last Name" to stext;
  3290.  
  3291.     To recompile a button's script:
  3292.  
  3293.     set the script of pg btn 1 to the script of pg btn 1;
  3294.  
  3295.     -----------------------------------
  3296.     SHADOW
  3297.  
  3298.     Purpose: Use the shadow property to determine whether a button has a
  3299.     shadow, giving it a three-dimensional appearance. The possible values
  3300.     are true and false; the default is false.
  3301.  
  3302.     This property can also be modified through the button's property box.
  3303.  
  3304.     Note:  Some monochrome and LCD systems will be unable to display a
  3305.     shadow correctly.
  3306.  
  3307.     Examples:
  3308.  
  3309.     set the shadow of me to false;
  3310.  
  3311.     set the shadow of page btn 1 to true;
  3312.  
  3313.     The shadow takes on the background color of the area on the screen
  3314.     behind the button. The shadow is drawn as follows:
  3315.  
  3316.  
  3317.  
  3318.     ________________________________________________________________________
  3319.                                              Chapter 12: Properties   207
  3320.     ________________________________________________________________________
  3321.  
  3322.  
  3323.  ┌───────────────────────────────────────────────────────────────────────┐
  3324.  │                                                                       │
  3325.  │ **** The Printed Documentation has a picture or screen shot here **** │
  3326.  │                                                                       │
  3327.  └───────────────────────────────────────────────────────────────────────┘
  3328.     
  3329.  
  3330.  
  3331.     -----------------------------------
  3332.     SHOWNAME
  3333.  
  3334.     Purpose: Use the showName property to determine whether the button's
  3335.     name is shown. When showName is true (the default), the name of the
  3336.     button is displayed using the current value of the align property.
  3337.  
  3338.     You can modify this property using the Button Info dialog box.
  3339.  
  3340.     When to use it: In most cases, the name of the button will be necessary
  3341.     for the user to know what is being selected.
  3342.  
  3343.     Examples:
  3344.  
  3345.     set the showName of page button 1 to true;
  3346.  
  3347.     See Also: align, name
  3348.  
  3349.     -----------------------------------
  3350.     STYLE
  3351.  
  3352.     Purpose: The style property allows you to determine the style of a
  3353.     button to. The possible values are: opaque, transparent, and checkBox.
  3354.  
  3355.     You can also modify this property using the Button Info dialog box.
  3356.  
  3357.     Examples:
  3358.  
  3359.     set the style of page button 1 to checkBox;
  3360.  
  3361.     if the style of page button "wow" is opaque then
  3362.       set the focus to page field 2;
  3363.  
  3364.     See Also: check
  3365.  
  3366.  
  3367.  
  3368.     ________________________________________________________________________
  3369.                                              Chapter 12: Properties   208
  3370.     ________________________________________________________________________
  3371.  
  3372.  
  3373.     -----------------------------------
  3374.     VISIBLE
  3375.  
  3376.     Purpose: Use the visible property to determine whether a
  3377.     button is shown or hidden. When a button is hidden, it is invisible and
  3378.     cannot be edited using the Selector tool unless the visible property is
  3379.     set to true.
  3380.  
  3381.     When a button is created, it is visible (the default). This property can
  3382.     be changed using hide or show. You can't change this property using the
  3383.     Button Info dialog box.
  3384.  
  3385.     When to use it: If you want to make a button appear or disappear,
  3386.     depending upon the user's action, you would modify this property.
  3387.  
  3388.     Example:
  3389.  
  3390.     set the visible of page button "Word" to false;
  3391.  
  3392.     set the visible of page button "help" to
  3393.       not the visible of the message box;
  3394.  
  3395.     See Also: lockText
  3396.  
  3397.     -----------------------------------
  3398.     WITHEDGE
  3399.  
  3400.     Purpose: Use the withEdge property to determine whether a button has
  3401.     characters defining its borders. When withEdge is true (the default), a
  3402.     button is displayed with a border. (The border type is the value of the
  3403.     edgeType property.)
  3404.  
  3405.     Examples:
  3406.  
  3407.     set the withEdge of page button 1 to true;
  3408.  
  3409.     See Also: edgeType, borderColor
  3410.  
  3411.  
  3412.  
  3413.     ________________________________________________________________________
  3414.                                              Chapter 12: Properties   209
  3415.     ________________________________________________________________________
  3416.  
  3417.  
  3418.     PAGE PROPERTIES
  3419.  
  3420.     -----------------------------------
  3421.     CANTDELETE
  3422.  
  3423.     Purpose: Setting cantDelete to true prevents a page from being deleted.
  3424.     When false, the page can be deleted using Delete Page on the Edit menu.
  3425.  
  3426.     This property can also be modified through the Page Info dialog box.
  3427.  
  3428.     When to use it: Set cantDelete to true when you want to protect pages
  3429.     from being accidentally deleted.
  3430.  
  3431.     Examples:
  3432.  
  3433.     set the cantDelete of page 2 to false;
  3434.  
  3435.     if the userLevel <= 2 then
  3436.       set the cantDelete of page 3 to true;
  3437.  
  3438.     See Also: userLevel, delete
  3439.  
  3440.     -----------------------------------
  3441.     ID
  3442.  
  3443.     Purpose: Use this property to retrieve the identifier that HyperPAD gave
  3444.     a page when it was created. The ID is the most reliable way to refer to
  3445.     a  page.
  3446.  
  3447.     You can see, but not modify, the page ID using the Page Info dialog box.
  3448.  
  3449.     Examples:
  3450.  
  3451.     put the id of page 1 into pg;
  3452.  
  3453.     if the id of me > 20 then go to page 1;
  3454.  
  3455.     See Also: longID
  3456.  
  3457.     -----------------------------------
  3458.     LONGID
  3459.  
  3460.     Purpose: Use the longID property to get a page's complete name,
  3461.     including the ID number and the full DOS path of the pad, as in the
  3462.     following example:
  3463.  
  3464.     page id 2 of pad "C:\HPAD.HOME.PAD"
  3465.  
  3466.     You cannot modify a page's longID.
  3467.  
  3468.     See Also: ID
  3469.  
  3470.  
  3471.  
  3472.     ________________________________________________________________________
  3473.                                              Chapter 12: Properties   210
  3474.     ________________________________________________________________________
  3475.  
  3476.  
  3477.     -----------------------------------
  3478.     LONGNAME
  3479.  
  3480.     Purpose: Use the longName property to determine a page's complete name,
  3481.     including the page ID and full DOS pathname of the current pad, in the
  3482.     following format:
  3483.  
  3484.     page id 2 of pad "C:\HPAD\HOME.PAD"
  3485.  
  3486.     Examples:
  3487.  
  3488.     put the longID of this page into the message box;
  3489.  
  3490.     The following example prints the current page with the longName as the
  3491.     heading.
  3492.  
  3493.     print the longName of this page;
  3494.     print this page;
  3495.  
  3496.     See Also: name
  3497.  
  3498.     -----------------------------------
  3499.     NAME
  3500.  
  3501.     Purpose: Use the name property to get or set the name of a page. This is
  3502.     the same name that appears in the Page Name option in the Page Info
  3503.     dialog box.
  3504.  
  3505.     Examples:
  3506.  
  3507.     if the name of page is "HOME" then
  3508.       answer "You are home now!";
  3509.  
  3510.     The following handler sets the name of the page when the page is
  3511.     created. This handler belongs in a background or pad script.
  3512.  
  3513.     handler newPage;
  3514.     begin
  3515.       set the name of the target to "page at" && time();
  3516.     end;
  3517.  
  3518.     See Also: longName, ID, longID
  3519.  
  3520.  
  3521.  
  3522.     ________________________________________________________________________
  3523.                                              Chapter 12: Properties   211
  3524.     ________________________________________________________________________
  3525.  
  3526.  
  3527.     -----------------------------------
  3528.     SCRIPT
  3529.  
  3530.     Purpose: Use the script property to retrieve or replace the current
  3531.     script of the page. By using the set command, this property will replace
  3532.     the current page script with a new one. The new script will be
  3533.     immediately compiled and checked for errors. Any handlers within the
  3534.     script that contain errors will not be compiled.
  3535.  
  3536.     The value of the script is a text string composed of lines separated by
  3537.     carriage returns.
  3538.  
  3539.     You can get to a page's script using the Page Info dialog box.
  3540.  
  3541.     Examples:
  3542.  
  3543.     put the script of page 3 into stext;
  3544.  
  3545.     set the script of page 6 to stext;
  3546.  
  3547.     The next example appends an openPage handler to the current script of
  3548.     the page. The new handler beeps when the page is opened.
  3549.  
  3550.     set the script of page 1 to the script of the page &
  3551.       return & return &
  3552.       "handler openPage;" & return &
  3553.       "begin" & return &
  3554.       "beep;" & return &
  3555.       "end;" & return;
  3556.  
  3557.  
  3558.  
  3559.     ________________________________________________________________________
  3560.                                              Chapter 12: Properties   212
  3561.     ________________________________________________________________________
  3562.  
  3563.  
  3564.     BACKGROUND PROPERTIES
  3565.  
  3566.     -----------------------------------
  3567.     CANTDELETE
  3568.  
  3569.     Purpose: Setting cantDelete to true prevents a background from being
  3570.     deleted. When false, the background can be deleted by deleting all of
  3571.     the pages that use that background.
  3572.  
  3573.     You can modify this property using the Background Info dialog box.
  3574.  
  3575.     When to use it: Set cantDelete to true when you want to protect
  3576.     backgrounds from being accidentally deleted.
  3577.  
  3578.     Examples:
  3579.  
  3580.     set the cantDelete of page 2 to false;
  3581.  
  3582.     if the userLevel <= 2 then
  3583.       set the cantDelete of page 3 to true;
  3584.  
  3585.     See Also: userLevel, delete
  3586.  
  3587.     -----------------------------------
  3588.     ID
  3589.  
  3590.     Purpose: The ID property gets the number which uniquely identifies a
  3591.     background. Using the ID number is the only sure way to uniquely
  3592.     reference a background.
  3593.  
  3594.     You can't change a background's ID.
  3595.  
  3596.     When to use it: Use the ID number in a script to refer to a background.
  3597.  
  3598.     Examples:
  3599.  
  3600.     put the id of bkgnd 8 into fid;
  3601.  
  3602.     go to background id 19;
  3603.  
  3604.     -----------------------------------
  3605.     LONGID
  3606.  
  3607.     Purpose: The longID property gets the background's full name, including
  3608.     its ID number and the full DOS path of the pad it's in, as in the
  3609.     following:
  3610.  
  3611.     bkgnd id 4 of "C:\HPAD\INDEX.PAD"
  3612.  
  3613.     You can't change the longID of a background.
  3614.  
  3615.     See Also: ID, name, longName
  3616.  
  3617.  
  3618.  
  3619.     ________________________________________________________________________
  3620.                                              Chapter 12: Properties   213
  3621.     ________________________________________________________________________
  3622.  
  3623.  
  3624.     -----------------------------------
  3625.     LONGNAME
  3626.  
  3627.     Purpose: The longName property retrieves the background's ID number and
  3628.     the full DOS path of the pad it's in, using the following format:
  3629.  
  3630.     bkgnd id 5 of pad "C:\HPAD\PHONE.PAD"
  3631.  
  3632.     You can't change the longName of a background.
  3633.  
  3634.     Examples:
  3635.  
  3636.     get the longName of bkgnd 5;
  3637.  
  3638.     put the longName of bkgnd 1 into the msg;
  3639.  
  3640.     See Also: name, ID, longID
  3641.  
  3642.     -----------------------------------
  3643.     NAME
  3644.  
  3645.     Purpose: Use the name property to get or set the name of a background.
  3646.  
  3647.     When to use it: It is often easier to refer to a background by name in a
  3648.     script then to use its object or ID number.
  3649.  
  3650.     You can modify a background's name using the Background Info dialog box.
  3651.  
  3652.     Examples:
  3653.  
  3654.     if the name of this bkgnd is "wild" then
  3655.       go to page 5;
  3656.  
  3657.     put the name of this background into page field 1;
  3658.  
  3659.     set the name of background id 4 to "template";
  3660.  
  3661.     See Also: longName, ID, longID
  3662.  
  3663.  
  3664.  
  3665.     ________________________________________________________________________
  3666.                                              Chapter 12: Properties   214
  3667.     ________________________________________________________________________
  3668.  
  3669.  
  3670.     -----------------------------------
  3671.     SCRIPT
  3672.  
  3673.     Purpose: The script property gets or replaces the current background
  3674.     script. Setting this property replaces the current background script
  3675.     with a new one. The new script will be compiled immediately and checked
  3676.     for errors. Any handlers within the script that contain errors will not
  3677.     be compiled.
  3678.  
  3679.     The value of the script is a text string composed of lines separated by
  3680.     carriage returns.
  3681.  
  3682.     You can also access the Background's script through the background
  3683.     property box.
  3684.  
  3685.     Examples:
  3686.  
  3687.     put the script of bkgnd 1 into junk;
  3688.  
  3689.     set the script of bkgnd 5 to ex;
  3690.  
  3691.  
  3692.  
  3693.     ________________________________________________________________________
  3694.                                              Chapter 12: Properties   215
  3695.     ________________________________________________________________________
  3696.  
  3697.  
  3698.     MESSAGE BOX PROPERTIES
  3699.  
  3700.     -----------------------------------
  3701.     LOCATION
  3702.  
  3703.     Purpose: Use the location property to determine the X (horizontal) and Y
  3704.     (vertical) coordinates of the upper left corner of the message box. The
  3705.     message box's position on-screen can be changed or accessed using the
  3706.     location property.
  3707.  
  3708.     If you get the location of the message box, it returns two numbers in
  3709.     "X,Y" format, such as
  3710.  
  3711.     12,14
  3712.  
  3713.     When you set the location of the message box, you must supply two
  3714.     parameters, like the following example:
  3715.  
  3716.     set the location of msg to 12,14;
  3717.  
  3718.     You can also modify the message box's position using the mouse.
  3719.  
  3720.     Examples:
  3721.  
  3722.     set the location of the message box to 32,1;
  3723.  
  3724.     Abbreviations: loc
  3725.  
  3726.     -----------------------------------
  3727.     VISIBLE
  3728.  
  3729.     Purpose: With the visible property, you determine whether
  3730.     the message box is shown or hidden. When the message box is hidden, it
  3731.     is invisible and cannot be accessed (although you can still put text
  3732.     into it). By default, the message box is not visible.
  3733.  
  3734.     This property can also be changed using the hide and show commands.
  3735.  
  3736.     Example:
  3737.  
  3738.     set the visible of msg to false;
  3739.  
  3740.     The following statements are equivalent:
  3741.  
  3742.     set the visible of the message box to true;
  3743.     show the message box;
  3744.  
  3745.     See Also: show, hide
  3746.  
  3747.  
  3748.  
  3749.     ________________________________________________________________________
  3750.                                              Chapter 12: Properties   216
  3751.     ________________________________________________________________________
  3752.  
  3753.  
  3754.     -----------------------------------
  3755.     WIDTH
  3756.  
  3757.     Purpose: Use the width property to adjust the size of the
  3758.     message box. The cannot set the width larger than the screen width.
  3759.  
  3760.     When to use it: When you want to shrink the message box so it doesn't
  3761.     obstruct your view of other elements on the page or background.
  3762.  
  3763.     Examples:
  3764.  
  3765.     To make the message box 40 characters wide:
  3766.  
  3767.     set the width of the msg to 40;
  3768.  
  3769.  
  3770.  
  3771.     ________________________________________________________________________
  3772.                                              Chapter 12: Properties   217
  3773.     ________________________________________________________________________
  3774.  
  3775.  
  3776.     TOOL BOX PROPERTIES
  3777.  
  3778.     -----------------------------------
  3779.     LOCATION
  3780.  
  3781.     Purpose: The location property determines the X (horizontal)
  3782.     and Y (vertical) coordinates of the upper left corner of the tool box,
  3783.     returning two numbers in "X,Y" format, like:
  3784.  
  3785.     18,4
  3786.  
  3787.     You can also move the tool box around the screen with the mouse.
  3788.  
  3789.     Examples:
  3790.  
  3791.     set the location of the tool box to 10,5;
  3792.  
  3793.     put the location of the tool box into msg;
  3794.  
  3795.     Abbreviations: loc
  3796.  
  3797.     -----------------------------------
  3798.     VISIBLE
  3799.  
  3800.     PURPOSE: USE the visible property to hide or show the tool box.
  3801.  
  3802.     When the tool box is hidden, it cannot be used by the pad user. By
  3803.     default, the tool box is not displayed (the visible is false).
  3804.  
  3805.     This property can be changed using the hide or show commands.
  3806.  
  3807.     You can also toggle the visibility of the tool box by selecting Tool Box
  3808.     from the Workspace menu.
  3809.  
  3810.     Example:
  3811.  
  3812.     set the visible of the tool box to false;
  3813.  
  3814.     See Also: hide, show
  3815.  
  3816.  
  3817.  
  3818.     ________________________________________________________________________
  3819.                                              Chapter 12: Properties   218
  3820.     ________________________________________________________________________
  3821.  
  3822.  
  3823.     MENU BAR AND STATUS BAR PROPERTIES
  3824.  
  3825.     -----------------------------------
  3826.     VISIBLE
  3827.  
  3828.     Purpose: Use the visible property to turn the menu bar or
  3829.     status bar on or off.
  3830.  
  3831.     You can also modify this property using the hide and
  3832.     show commands, or by accessing the Menu Bar and Status Bar
  3833.     commands from the Workspace menu. ALT+SPACE also lets you toggle the
  3834.     menu bar on and off.
  3835.  
  3836.     The status bar can't be displayed without the menu bar.
  3837.  
  3838.     When to use it: If your pad includes its own menu bar, or if you don't
  3839.     want your users to access the menu commands, set the visible
  3840.     of the menu bar to off. If you want your pad users to be able to read
  3841.     messages you place on the bottom line on the screen, turn the status bar
  3842.     off.
  3843.  
  3844.     Example:
  3845.  
  3846.     set the visible of the menu bar to false;
  3847.  
  3848.     set the visible of the status bar to true;
  3849.  
  3850.     if the visible of the menu bar then
  3851.       set the visible of the status bar to true;
  3852.  
  3853.     See Also: show, hide
  3854.